-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[HttpKernel] Allow bundles to declare classes and annotated classes to compile using patterns #19205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
return $regexps; | ||
} | ||
|
||
private function matchAnyRegexp($class, $regexps) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be matchAnyRegexps (missing "s")
I've been working on this with @tgalopin, so here are a few more thoughts: Currently, bundles can use addClassesToCompile to declare which FQCN should be inlined for fast bootstrapping. The second feature is adding a way for bundles to declare which classes have annotations that are going to be used in the app. This is useful for warming up annotation reader caches, but also makes it possible to inline classes that have annotations on them (and thus add the The linked PR uses these to warm up the annotations cache. |
*/ | ||
public function addClassesToCompile(array $classes) | ||
public function addClassesToCompile(array $classes, array $annotatedClasses = array()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rather than adding a second argument, I suggest adding a new method. It will make the code more readable
I don't see any code reading the annotations.map file. Is there something missing in the diff ? |
43aad08
to
3ecb1f7
Compare
I did the changes. |
@tgalopin then it is good to explain it, so that people reviewing the code can understand it. and this makes me tell than the split in multiple PRs is not good, as this PR introduces dead features. This PR should probably deal only with compiled classes |
I think that this really belong to its own PR: the generated |
b5d0d52
to
a5c932c
Compare
8a0f5c0
to
5b48e8d
Compare
👍 |
'**Bundle\\Controller\\', | ||
'**Bundle\\Entity\\', | ||
|
||
// Added explicitly so that we dont rely on the class map being dumped to make it work |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dont
-> don't
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed, thanks :) .
Thank you @tgalopin. |
…tated classes to compile using patterns (tgalopin) This PR was merged into the 3.2-dev branch. Discussion ---------- [HttpKernel] Allow bundles to declare classes and annotated classes to compile using patterns | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - This PR introduces a simple system of patterns based on wildcards for classes to cache in the HttpKernel dependency injections extensions. This system started to be implemented in #18533 but I split it up here to use it also in the classes to compile. Commits ------- 1be7424 [HttpKernel] Allow usage of patterns in classes and annotations to cache
…nd annotated classes to compile using patterns (tgalopin) This PR was merged into the 3.2-dev branch. Discussion ---------- [HttpKernel] Allow bundles to declare classes and annotated classes to compile using patterns | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - This PR introduces a simple system of patterns based on wildcards for classes to cache in the HttpKernel dependency injections extensions. This system started to be implemented in symfony#18533 but I split it up here to use it also in the classes to compile. Commits ------- 1be7424 [HttpKernel] Allow usage of patterns in classes and annotations to cache
…nd annotated classes to compile using patterns (tgalopin) This PR was merged into the 3.2-dev branch. Discussion ---------- [HttpKernel] Allow bundles to declare classes and annotated classes to compile using patterns | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - This PR introduces a simple system of patterns based on wildcards for classes to cache in the HttpKernel dependency injections extensions. This system started to be implemented in symfony#18533 but I split it up here to use it also in the classes to compile. Commits ------- 1be7424 [HttpKernel] Allow usage of patterns in classes and annotations to cache
The service 'cache.annotations', which is resolved when the metadata reader is received from the container in the Pass, is not available at that point in the container compilation process. This changeset defers the PropelModelsPass until a point in time, where the container is fully accessible. Ref: symfony/symfony#19205
The service 'cache.annotations', which is resolved when the metadata reader is received from the container in the Pass, is not available at that point in the container compilation process. This changeset defers the PropelModelsPass until a point in time, where the container is fully accessible. Ref: symfony/symfony#19205
This PR introduces a simple system of patterns based on wildcards for classes to cache in the HttpKernel dependency injections extensions. This system started to be implemented in #18533 but I split it up here to use it also in the classes to compile.