Repository navigation
ci: use shared myerscode/workflows - #10
Merged
Merged
Conversation
Normalise CI to shared reusable workflows (@v1) on develop.
oniice
force-pushed
the
ci/use-shared-workflows
branch
from
October 30, 2026 16:27
60a92ed to
48ec05b
Compare
oniice
added a commit
that referenced
this pull request
Oct 30, 2026
* refactor(core): updated code standards and styling
Signed-off-by: Fred Myerscough <oniice@gmail.com>
* refactor(framework): modernise codebase with Rector
- Add declare(strict_types=1) to all files
- Add #[Override] attributes to overriding methods/properties
- Finalize test case classes
- Improve variable naming to match types
- Use first-class callable syntax
- Remove redundant parent constructor delegation
- Modernise PHPUnit assertions
* refactor(acorn-framework): modernise codebase with Rector
* chore(acorn-framework): update dependencies to latest major versions
* chore(acorn-framework): standardise dev tooling
* chore(acorn-framework): fix static analysis issues
* chore(acorn-framework): update phpunit.xml for PHPUnit 12
* chore(acorn-framework): standardise CI workflows
* docs(acorn-framework): update license year, README badges, and CHANGELOG
* refactor(acorn-framework): modernise codebase with Rector
* chore(acorn-framework): update dependencies, tooling, CI, and docs
* fix(cache): has() delegates to driver so falsy cached values are not treated as misses
* fix(cache): set() converts DateTimeInterface TTL to seconds or throws if in the past
* fix(logger): create log directory if it does not exist before writing
* fix(output): table() now calls render() so output is actually written
* fix(commands): remove shell injection in ClearConfigCacheCommand
- Replace terminal()->run('rm -f ...') with native unlink()
- Add guard for empty/null cache location
- Add tests verifying file deletion and graceful handling
* fix(config): replace var_export cache with JSON format
- Config cache now writes JSON instead of executable PHP
- Eliminates code injection vector via var_export
- Cache file changed from config.php to config.json
- Uses LOCK_EX for atomic writes
- Update test to verify JSON output and no PHP in cache
* fix(cache): validate and create cacheDir on construction
- FileCacheDriver now creates the cache directory if missing
- Prevents errors when writing to a nonexistent path
- Add test verifying directory auto-creation
* fix(pipeline): add runtime guard for string pipe validation
- Add is_subclass_of check in createLayer() as defence-in-depth
- Document that only trusted class names should be used as pipes
- setPipes() already filters invalid pipes; this adds a second barrier
* fix(config): validate discovered paths are within package
- Add isWithinPackage() guard to prevent path traversal
- Skip packages whose command/provider paths escape their root
- Protects against malicious composer.json extra metadata
* fix(logger): sanitise newlines to prevent log injection
- Strip CR/LF from message and context before writing
- Prevents log forging attacks via injected newlines
- Add tests verifying single-line output for multi-line input
* feat(terminal): add runSafe() for shell-injection-free execution
- New runSafe() method accepts array of arguments
- Bypasses shell interpretation using Process array constructor
- Prevents injection of metacharacters in command arguments
- Add tests verifying safe handling of shell metacharacters
* fix(providers): BootableServiceProvider now extends ServiceProvider
- Was extending AbstractServiceProvider directly, bypassing the
is_subclass_of(ServiceProvider) check in Container::addServiceProvider()
- Remove duplicate $provides and register() declarations (inherited)
- Bootable providers can now be registered in the container
* refactor(app): extract bootstrap() from constructor
- Move provider registration, package discovery, event binding,
and command loading into explicit bootstrap() method
- Constructor now calls parent first, then bootstraps
- Makes boot sequence testable and boot order explicit
* docs(app): document dual-dispatcher architecture
- Add detailed docblock to bindCommandEvents() explaining the
Symfony/Acorn dispatcher relationship and bridging mechanism
- Note that future Console events require manual bridging
- Reference future consolidation path
* refactor(events): move callable listener registry to Dispatcher
- Callable listeners now tracked per-Dispatcher instance
- Eliminates static memory leak across process lifetime
- Dispatcher exposes callableListeners(), findCallableListener(),
clearCallableListeners(), createCallableListener()
- CallableEventManager retained for backward compat, marked deprecated
- Add tests for instance-scoped callable listener tracking
* docs(helpers): document singleton dependency and usage scope
- Add file-level docblock warning against use in library code
- Explain hidden coupling, testability, and isolation concerns
- Recommend constructor injection for framework internals
* fix(events): add exception isolation in dispatch loop
- Wrap listener execution in try/catch so one failing listener
does not prevent subsequent listeners from executing
- Add test proving third listener runs after second throws
* fix(container): pass $shared parameter through in add()
- Container::add() now respects the $shared parameter
- Previously the parameter was accepted but silently ignored
- Add tests verifying shared/non-shared behaviour
* fix(cache): check expiry in has() and fix DateInterval conversion
- FileCacheDriver::has() now checks expiration, not just file existence
- RuntimeCache::has() now checks expiry timestamp
- Fix DateInterval TTL conversion in both drivers — use proper
total seconds calculation instead of broken format('%s')
- Add tests for expiry behaviour and DateInterval intervals
* fix(container): remove() now properly removes the binding
- Use Definitions::remove() to actually unset the definition
- Previously overwrote with null which caused get() to return null
- Now get() after remove() throws NotFoundException as expected
- Add test verifying removal behaviour
* fix(kernel): simplify run() failure path
- Remove TODO comment and redundant nesting
- Only throw if result has an actual Exception
- Non-zero exit codes without exceptions now return correctly
* fix(terminal): correct usleep multiplier from ms to microseconds
- usleep() expects microseconds, was passing milliseconds (x1000)
- Now correctly converts seconds to microseconds (x1_000_000)
* fix(kernel): cache Manager instance in config()
- config() now returns the same Manager instance on repeated calls
- Previously allocated a new Manager on every invocation
- Allows state modifications (e.g. doNotCacheConfig) to persist
* docs(events): document emit() trusted-only usage
- Add security docblock warning against user-controlled event names
- Document that emit() instantiates classes directly
* fix(app): validate provider class before adding to container
- serviceProviders() now checks class_exists and is_subclass_of
before adding to the provider list
- Prevents confusing errors from malformed files in provider dirs
* docs(container): note circular dependency limitation
- Add comment explaining ReflectionContainer does not detect cycles
- Advise avoiding circular constructor dependencies
* fix(commands): add security warning to config:show output
- Display warning about sensitive filesystem paths in output
- Caution users against running in untrusted environments
* fix(commands): replace print_r with table output in listener:show
- Use output->table() instead of print_r() for structured display
- Fix config key references to use correct dot notation
* fix(console): remove dead branch in parseArgument()
- endsWith(['=', '=']) had duplicate values, simplified to endsWith('=')
* fix(console): hasOption() uses !== null instead of !empty()
- Options with value "0" or false are no longer treated as absent
* refactor(logger): remove dead logFileName property
- Constructor stored logFileName but it was never used
- The property would be stale for rotation modes anyway
* feat(console): Command::handle() now returns int exit code
- Change abstract handle() from void to int return type
- Commands can now signal non-zero exit codes without throwing
- Update all framework and test commands to return 0
* fix(deps): set minimum-stability to stable
- Changed from dev to stable to prevent unstable transitive deps
- dev-main constraint on acorn-testing is inherently dev-stability
and Composer allows it specifically without global dev stability
* style: add declare(strict_types=1) to framework files
- Add strict types to Application, Kernel, Container, Dispatcher,
Pipeline, Command, Event, ListenerQueue, ServiceProvider
- Fix SubCommandFailedException constructor call exposed by strict mode
* fix(logger): validate log level per PSR-3 requirement
- Throw InvalidArgumentException for unrecognised log levels
- Add test verifying invalid level throws
* refactor(kernel): remove redundant null check in processCommand()
- boot() already guarantees application is set or throws
- Use application() accessor which has the same guard
* fix(pipeline): use new static() to satisfy return type
- Replaces new self() with new static() for correct covariance
- Removes @PHPStan-Ignore suppression comment
* docs: add performance notes to ListenerQueue and loadCommands
- Document O(n) rebuild cost in ListenerQueue::remove()
- Note filesystem scanning performance in loadCommands()
* refactor(container): accept optional DependencyManager in constructor
- DependencyManager can now be injected for testability
- Defaults to creating its own instance if none provided
- Remove readonly modifier to support conditional assignment
* refactor(events): make Listener::listensFor() abstract
- Forces subclasses to explicitly declare which events they handle
- Removes silent no-op when property was accidentally left empty
- Update all framework and test listeners to implement the method
* fix(providers): explicitly mark Dispatcher as shared
- Use addShared() instead of add() to ensure the same Dispatcher
instance is returned on every container resolution
* refactor(events): consolidate dual dispatcher into single adapter
- Dispatcher now implements Symfony EventDispatcherInterface
- Eliminates need for separate Symfony EventDispatcher in Application
- bindCommandEvents() uses Acorn Dispatcher directly with setDispatcher()
- Add getListenerPriority(), hasListeners(), getPriority() methods
- Rename addSubscriber/removeSubscriber for Symfony compat, add
addAcornSubscriber/removeAcornSubscriber for Acorn subscribers
- dispatch() now returns the event object per Symfony contract
- Accepts non-Acorn events (Symfony Console events) natively
- Update tests for new behaviour and remove outdated assertions
* refactor(pipeline): improve LineManager::through() type clarity
- Add proper docblock explaining single vs multi-pipeline behaviour
- Use ARRAY_FILTER_USE_BOTH for clearer key filtering
- Type-hint the filter callback parameter as PipeCollection
* docs: update documentation for all framework changes
- commands.md: document handle() int return type and exit codes
- events.md: document unified dispatcher, Symfony interface, emit()
- listeners.md: update to abstract listensFor() method pattern,
add exception isolation and queueable listener docs
- terminal.md: add runSafe() documentation for safe execution
- logging.md: add log level validation, sanitisation, PSR-3 notes
- cache.md: add TTL formats, driver details, helper methods
* feat(console): add interactive prompts and progress indicators
* style: apply pint formatting
* feat(console): add interactive prompts and progress indicators with tests
* docs: add prompts and progress indicators documentation
* feat(exceptions): add global exception handler with catch/report/render hooks
* test(exceptions): add tests for ExceptionHandler
* docs: add error handling documentation
* feat(exceptions): add config-driven error handler mapping
* docs: add config-driven error handler mapping examples
* fix(exceptions): pass output to ErrorHandler::handle(), fix League container union type issue
* docs: add default handler and panic handler documentation
* fix(exceptions): remove ErrorHandler::register() to prevent Symfony Console from intercepting exceptions
* chore: remove unused symfony/error-handler dependency
* ci: use shared myerscode/workflows (#10)
Normalise CI to shared reusable workflows (@v1) on develop.
---------
Signed-off-by: Fred Myerscough <oniice@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Migrates CI to the shared myerscode/workflows reusable workflows (
@v1), targeting develop. Normalises filenames to ci.yml / release.yml / update-changelog.yml and removes standalone/outlier workflows. php8.5, extensionsctype, iconv, json, mbstring, schemecalver.