-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Use #[Autowire] attribute in FileUploader service example #20914
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
Open
foybkaa
wants to merge
2,612
commits into
symfony:6.4
Choose a base branch
from
foybkaa:patch-3
base: 6.4
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
This PR was merged into the 7.2 branch. Discussion ---------- Replaced `caution` directive by `warning` Fixes symfony#20371 Commits ------- 0a3fb8d Replaced `caution` directive by `warning`
…nverterInterface (mttsch) This PR was merged into the 7.1 branch. Discussion ---------- [Serializer] Add class/format/context to NameConverterInterface Fix symfony#19683 <!-- If your pull request fixes a BUG, use the oldest maintained branch that contains the bug (see https://symfony.com/releases for the list of maintained branches). If your pull request documents a NEW FEATURE, use the same Symfony branch where the feature was introduced (and `7.x` for features of unreleased versions). --> Commits ------- b53029a [Serializer] Add class/format/context to NameConverterInterface
…olas Appriou) This PR was submitted for the 6.3 branch but it was merged into the 7.1 branch instead. Discussion ---------- 42948 reduce response contraints verbosity Link the issue [#49184](symfony/symfony#49184), and [PR](symfony/symfony#49184). Update signature of HTTP response constraints. Commits ------- d159a4a [HttpFoundation] Update http response test constraint signature
* 6.4: [symfony#19940] Use specialized directive Add more necessary information Update calling_commands.rst - call the command non interactively add symfonycasts links in frontend doc
* 7.1: [symfony#19940] Use specialized directive Add more necessary information Update calling_commands.rst - call the command non interactively [HttpFoundation] Update http response test constraint signature add symfonycasts links in frontend doc [Serializer] Add class/format/context to NameConverterInterface
* 6.4: Added replacement suggestions for forbidden directives
* 7.1: Added replacement suggestions for forbidden directives
* 6.4: Remove obsolete whitelist entry
* 7.1: Remove obsolete whitelist entry
* 6.4: Add missing argument [Mesenger] Mention that some option doesn't have docs
* 7.1: Add missing argument [Mesenger] Mention that some option doesn't have docs
* 7.1: Minor tweaks [Scheduler] Add some pointers regarding worker processes deployment
* 6.4: Minor tweaks [Scheduler] Add some pointers regarding worker processes deployment
* 7.1: Update controller.rst
* 6.4: Update controller.rst
…tion (Korbeil) This PR was merged into the 7.2 branch. Discussion ---------- [TypeInfo] Add more details to TypeInfo documentation This pull request is to revamp current TypeInfo documentation. I tried to make the most of the recent changes while answering `@javiereguiluz`'s issue (thanks to "PHPDoc parsing" part). It should fixes symfony#20389, symfony#20064 and symfony#20014. Commits ------- dc999f3 Add more details to TypeInfo documentation
* 6.4: Minor tweaks Add few doc on marshaller in redis adapter
* 7.1: Minor tweaks Add few doc on marshaller in redis adapter
* 6.4: [Twig] [Twig Reference] fix path parameter and add example in asset v… Update serializer.rst
* 7.1: [Twig] [Twig Reference] fix path parameter and add example in asset v… Update serializer.rst
…bbuh) This PR was merged into the 7.1 branch. Discussion ---------- use ? before nullable single type declaration see https://github.com/symfony/symfony-docs/actions/runs/12357370718/job/34485453495 Commits ------- b0f09c6 use ? before nullable single type declaration
* 7.1: use ? before nullable single type declaration
…word strength estimator (stof) This PR was merged into the 7.2 branch. Discussion ---------- [Validator] Fix the configuration for custom password strength estimator Fixes symfony/symfony#59235 `service_closure` is about building an argument being a closure **returning** that service. This is not what we need for the custom estimator, where we need to inject the estimator callable. Commits ------- 8aeceab Fix the configuration for custom password strength estimator
* 6.4: Minor tweaks [Twig] [twig reference] add examples to functions and filter
* 6.4: Tweaks and rewords [Twig] [twig reference] add examples to functions (format_file, file_…
* 6.4: Fix some syntax issues
* 6.4: Reword [Scheduler] Periodical triggers timing
* 6.4: Reword [Mailer] Update mailer.rst
* 6.4: Fix RST syntax issue
* 6.4: Minor reword fix command explanation
This PR was submitted for the 7.3 branch but it was merged into the 7.2 branch instead. Discussion ---------- [Scheduler][Webhook] add screencast links I'm of course biased but I think these short screencasts do a good job of showing the basics. **Webhook**: shows installing, configuring an email remote event parser, and creating a consumer. **Scheduler**: shows installing, creating, adding tasks, running the schedule. Commits ------- a7a6c1d [Scheduler][Webhook] add screencast links
* 6.4: Minor tweak Franken PHP can perform some action after the response has been streamed to the user
* 6.4: Tweaks [Serializer] (re)document PRESERVE_EMPTY_OBJECTS
* 6.4: Update end_to_end.rst
* 6.4: Minor tweaks [Deployment] - More accurate local .env file recommendation
* 6.4: [HttpFoundation] Add FrankenPHP docs for X-Sendfile
* 6.4: Update the links related to X-Sendfile and X-Accel-Redirect Update the build script to mention that it does not support Windows
* 6.4: Fix a syntax issue in Coding Standards
* 6.4: Minor tweak feat: swap from event constant to event class
* 6.4: Update embedded.rst
* 6.4: Update routing.rst
* 6.4: [EventDispatcher] Fix a minor syntax issue in a reference
* 6.4: [Console] Minor tweak in the article introduction
* 6.4: Tweaks [uid] Fix Uuid::v8() usage example to show it requires a UUID string fix(doctrine): default configuration
Replaced the YAML-based injection of the uploads_directory parameter with the #[Autowire] attribute directly in the FileUploader constructor. This avoids service configuration issues and ensures the example works out of the box with modern Symfony versions.
OskarStark
reviewed
Apr 24, 2025
Co-authored-by: Oskar Stark <oskarstark@googlemail.com>
OskarStark
reviewed
Apr 25, 2025
controller/upload_file.rst
Outdated
@@ -240,7 +240,8 @@ logic to a separate service:: | |||
class FileUploader | |||
{ | |||
public function __construct( | |||
#[Autowire('%brochures_directory%')] private string $targetDirectory, | |||
#[Autowire('%brochures_directory%')] | |||
private string $targetDirectory, |
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.
indentation looks wrong
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.
Replaced the YAML-based injection of the uploads_directory parameter with the #[Autowire] attribute directly in the FileUploader constructor. This avoids service configuration issues and ensures the example works out of the box with modern Symfony versions.