Merged
Conversation
Benchmark ResultsComparison of Open to see the benchmark results
Generated by phpbench against commit 2888faf |
Contributor
|
Aidan's not the only one who loves the commits :D |
xHeaven
requested changes
Mar 12, 2026
packages/upgrade/src/Tempest34/UpdateKernelDiscoveryPropertiesRector.php
Outdated
Show resolved
Hide resolved
xHeaven
previously requested changes
Mar 12, 2026
Member
|
There are also a couple |
…Rector.php Co-authored-by: Márk Magyar <magyarheaven@gmail.com>
Co-authored-by: Márk Magyar <magyarheaven@gmail.com>
Co-authored-by: Márk Magyar <magyarheaven@gmail.com>
Co-authored-by: Márk Magyar <magyarheaven@gmail.com>
Co-authored-by: Márk Magyar <magyarheaven@gmail.com>
Co-authored-by: Márk Magyar <magyarheaven@gmail.com>
Co-authored-by: Márk Magyar <magyarheaven@gmail.com>
…covery-improvements
Member
Author
|
TODO: make actions for discovery generate and discovery clean |
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.
Upgrade Guide
Install Rector if you haven't yet:
Next, update Tempest; it's important to add the
--no-scriptsflag to prevent any errors from being thrown during the update.Then configure Rector to upgrade to Tempest 3.4:
Next, run Rector:
Finally: make sure all discovery caches are regenerated and config cache is cleared:
Breaking changes:
Tempest\Core\DiscoveryCachemoved toTempest\Discovery\DiscoveryCacheTempest\Core\DiscoveryCacheStrategymoved toTempest\Discovery\DiscoveryCacheStrategyTempest\Core\Composermoved toTempest\Discovery\ComposerTempest\Core\ComposerJsonCouldNotBeLocatedmoved toTempest\Discovery\ComposerJsonCouldNotBeLocatedTempest\Core\DiscoveryCachingStrategyWasChangedmoved toTempest\Discovery\DiscoveryCachingStrategyWasChangedTempest\Core\DiscoveryConfigmoved toTempest\Discovery\DiscoveryConfigKernel::$discoveryLocationsandKernel::$discoveryClassesproperty hooksFrameworkKernel::$discoveryLocationsandFrameworkKernel::$discoveryClassespropertiesNon-breaking changes:
Tempest\Core\LoadDiscoveryClassesmoved toTempest\Discovery\BootDiscoveryTempest\Core\LoadDiscoveryLocationsmoved toTempest\Discovery\AutoloadDiscoveryLocationsTempest\Core\DiscoveryCacheInitializermoved toTempest\Discovery\DiscoveryCacheInitializerTempest\Core\DiscoveryDiscoverymoved toTempest\Discovery\DiscoveryDiscoveryDiscovery as a standalone package
tempest/discoverycan be used as a standalone package in any application. All it needs is a PSR-11 compliant container.Start by requiring
tempest/discovery:composer require tempest/discoveryNext, you can boot discovery:
Whenever this action is run, discovery will find all discovery classes, and run them against all registered locations.
Manually specify discovery locations
DiscoveryConfig::autoload()will scan a given root path and autmatically determine discovery locations by analyzing the composer.json file in that path. If you prefer another way of defining locations to scan, you can manually provide them viaDiscoveryConfig:Config and caching
You can pass config and cache parameters into the
BootDiscoveryaction, with these you can exclude files and classes from discovery, as well as config caching behavior: