Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add router resource type option to FrameworkExtension#64

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
jmikola wants to merge67 commits intosymfony:masterfromopensky:router-typeOption
Closed

Add router resource type option to FrameworkExtension#64

jmikola wants to merge67 commits intosymfony:masterfromopensky:router-typeOption

Conversation

jmikola
Copy link
Contributor

The router LoaderInterface class already supported a type parameter, but the top-level Router class had no suppport for it.

fabpotand others added30 commitsFebruary 5, 2011 16:02
…gent option merging for FrameworkExtensionRestructured config format to make processing more straightforward. Important changes that might break existing configs: * Added "enabled" option for translator (improves multi-format compat) * Removed hash variation of validation annotations option (only boolean) * Moved namespace option directly under validation (improves multi-format compat)The new merge process depends on an internal array of all supported options and their default values, which is used for both validating the config schema and inferring how to merge options (as an added benefit, it helps make the extension self-documenting). Exceptions will now be thrown for merge errors resulting from unrecognized options or invalid types. Since incoming configurations are all merged atop the defaults, many isset() checks were removed. As a rule of thumb, we probably only want to ignore null values when an option would be used to set a parameter.Also: * Added missing attributes to symfony-1.0.xsd   * profiler: added only-exceptions attribute   * session: fix types and add pdo attributes * Create FrameworkExtension tests with PHP/XML/YAML fixtures * Use "%" syntax instead of calling getParameter() within FrameworkExtension * Normalize config keys and arrays with helper methods for PHP/XML/YAML compatibilityEarlier changes: * Remove nonexistent "DependencyInjection/Resources/" path from XmlFileLoaders * Remove hasDefinition() checks, as register methods should only execute once * Remove first-run logic from registerTranslatorConfiguration(), as it is only run once * Removed apparently obsolete clearTags() calls on definitions for non-enabled features
…itionsPreviously, the Definition class was used both for type inference and factory construction (if factoryService was absent). This is fine for cases where classes create instances of themselves (e.g. getInstance() or create()), but leads to ambiguity when we have a separate factory class.
This fixes SQLiteProfilerStorageTest, that was failing using PDO.
… parent forms are modified by reference when this option is true (the default)The implication is that set<Reference>() in the object of the parent form will not be called (and thus not has to be implemented/public).If you want to suppress this behaviour, manually set "by_reference" to false.
This commit removes CollectionToStringTransformer. Transformers should never change the state of the outside world, otherwise hard-to-track bugs might creap in.This functionality needs to be implemented as a custom FieldType (see EntityChoiceField).
…igurationsThe merging is done in three steps:    1. Normalization:    =================    All passed config arrays will be transformed into the same structure    regardless of what format they come from.    2. Merging:    ===========    This is the step when the actual merging is performed. Starting at the root    the configs will be passed along the tree until a node has no children, or    the merging of sub-paths of the current node has been specifically disabled.       Left-Side       Right-Side      Merge Result       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~       -nothing-       array           Right-Side will be taken.       scalar          scalar          Right-Side will be taken.       array           false           Right-Side will be taken if ->canBeUnset()                                       was called on the array node.       false           array           Right-Side will be taken.       array           array           Each value in the array will be passed to                                       the specific child node, or the prototype                                       node (whatever is present).    3. Finalization:    ================    The normalized, and merged config will be passed through the config tree to    perform final validation on the submitted values, and set default values    where this has been requested.You can influence this process in various ways, here is a list with some examples.All of these methods must be called on the node on which they should be applied.  * isRequired(): Node must be present in at least one config file.  * requiresAtLeastOneElement(): PrototypeNode must have at least one element.  * treatNullLike($value): Replaces null with $value during normalization.  * treatTrueLike($value): Same as above just for true  * treatFalseLike($value): Same as above just for false  * defaultValue($value): Sets a default value for this node (only for scalars)  * addDefaultsIfNotSet(): Whether to add default values of an array which has not                           been defined in any configuration file.  * disallowNewKeysInSubsequentConfigs(): All keys for this array must be defined                                          in one configuration file, subsequent                                          configurations may only overwrite these.  * fixXmlConfig($key, $plural = null): Transforms XML config into same structure                                        as YAML, and PHP configurations.  * useAttributeAsKey($name): Defines which XML attribute to use as array key.  * cannotBeOverwritten(): Declares a certain sub-path as non-overwritable. All                           configuration for this path must be defined in the same                           configuration file.  * cannotBeEmpty(): If value is set, it must be non-empty.  * canBeUnset(): If array values should be unset if false is specified.Architecture:=============The configuration consists basically out of two different sets of classes.  1. Builder classes: These classes provide the fluent interface and                      are used to construct the config tree.  2. Node classes: These classes contain the actual logic for normalization,                   merging, and finalizing configurations.After you have added all the metadata to your builders, the call to->buildTree() will convert this metadata to actual node classes. Most of thetime, you will not have to interact with the config nodes directly, but willdelegate this to the Processor class which will call the respective methodson the config node classes.
…rging and normalizationThis fixes some BC problems introduced inf9138d3. Some top-level can now be simply enabled by providing true/null in PHP/YAML. Additionally, the Configuration\Builder allows options to be unset by providing "false" (helpful for overriding activation in a previous config file). All options supporting these behaviors can be found in the Configuration.php file (look for canBeUnset() and treatNull/TrueLike()).Major changes: * Removed "enabled" option for profiler config. Profiler is now enabled if its config is true, null or a map. * Restore original config structure for validation namespaces. In PHP/YAML, namespaces are defined under annotations as an alternative to false (disabled) and true/null (enabled). For XML, annotation remains a boolean attribute for validation and a one or more optional namespace tags may appear within <app:validation />. During config normalization, namespace tags under validation will be moved to annotations to conform to the PHP/YAML structure (this occurs transparently to the user). * Restore behavior for router/templating config sections being optional (as shown in changes to session/validation test fixtures). If either top-level section is unset in the configuration, neither feature will be enabled and the user will no longer receive exceptions due to missing a resource option (router) or engines (templating). Resource/engines will still be properly required if the respective feature is enabled. * Remove unused router type option from XML config XSD. Type is only relevant for import statements, so this option is likely useless.Additional small changes: * Added isset()'s, since config options may be unset * Wrap registerXxxConfiguration() calls in isset() checks * Load translation.xml in configLoad(), since it's always required * Default cache_warmer value (!kernel.debug) is determined via Configuration classThings to be fixed: * Configuration\Builder doesn't seem to respect isRequired() and requiresAtLeastOneElement() (or I haven't set it properly); this should replace the need for FrameworkExtension to throw exceptions for bad router/templating configs * The config nodes for session options don't have the "pdo." prefix, as dots are not allowed in node names. To preserve BC for now, the "pdo." prefix is still allowed (and mandated by XSD) in configuration files. In the future, we may just want to do away with the "pdo." prefix. * Translator has an "enabled" option. If there's no use case for setting "fallback" independently (when "enabled" is false), perhaps "enabled" should be removed entirely and translator should function like profiler currently does. * Profiler matcher merging might need to be adjusted so multiple configs simply overwrite matcher instead of merging its array keys.
pborreliand others added23 commitsFebruary 7, 2011 02:49
… container aware fixture loaderUpdated load data fixtures command in DoctrineMongoDBBundle to be identical to the one in DoctrineBundleCreated custom loader, that passes $container to all ContainerAware DataFixtures
…lized with NULL, an object is automatically created using this constructor. If no constructor is given but the option "data_class" is set, an object of that class is created with the default constructor instead.
…() twig functionMethods within FormExtension later type-hint this parameter as an array, but it's convenient to allow a single string to be passed from Twig if we ensure it's wrapped in an array.
…(and expose this in FrameworkExtension config)In routing files, import statements allow an optional "type" option to hint the resources' type (e.g. for ambiguous file extensions). This adds the same type option to the FrameworkExtension config, which defines the main routing resource.
dawehner pushed a commit to dawehner/symfony that referenced this pull requestJul 1, 2013
SofHad pushed a commit to SofHad/symfony that referenced this pull requestOct 12, 2015
…guiluz)This PR was squashed before being merged into the master branch (closessymfony#64).Discussion----------Fixed the help notes of the AddUser commandIn the [run() method of the Command class](https://github.com/symfony/symfony/blob/2.7/src/Symfony/Component/Console/Command/Command.php#L220-263) you can see the following:```phppublic function run(InputInterface $input, OutputInterface $output){    // ...    $this->initialize($input, $output);    // ...    if ($input->isInteractive()) {        $this->interact($input, $output);    }    // ...    $statusCode = $this->execute($input, $output);    return is_numeric($statusCode) ? (int) $statusCode : 0;}```Therefore, our help note was wrong and the method order is ` initialize()` -> `interact()` -> `execute()`Commits-------7afdf50 Fixed the help notes of the AddUser command
fabpot added a commit that referenced this pull requestJan 25, 2016
…e arguments in collection arguments (ogizanagi)This PR was merged into the 3.1-dev branch.Discussion----------[DependencyInjection] Properly ignore invalid reference arguments in collection arguments| Q             | A| ------------- | ---| Bug fix?      | no| New feature?  | yes| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets | -| License       | MIT| Doc PR        | -With this new feature, the following configuration:```xml<service/><service>    <argument type="collection">        <argument type="service" on-invalid="ignore" />        <argument type="service" />        <argument type="service" on-invalid="null" />    </argument>    <argument type="service" on-invalid="ignore" />    <argument type="service" />    <argument type="service" on-invalid="null" />    <call method="foo">        <argument type="service" on-invalid="ignore" />    </call>    <call method="fooCollection">        <argument type="collection">            <argument type="service" on-invalid="ignore" />            <argument type="service" />            <argument type="service" on-invalid="null" />        </argument>    </call></service>```will result into the following `Definition`:```phpDefinition {#64 ▼  -class: "Foo"  // […]  -calls: array:1 [▼    0 => array:2 [▼      0 => "fooCollection"      1 => array:1 [▼        0 => array:2 [▼          0 => Reference {#59 ▼            -id: "baz"            -invalidBehavior: 1          }          1 => null        ]      ]    ]  ]  // […]  #arguments: array:4 [▼    0 => array:2 [▼      0 => Reference {#63 ▼        -id: "baz"        -invalidBehavior: 1      }      1 => null    ]    1 => null    2 => Reference {#56 ▼      -id: "baz"      -invalidBehavior: 1    }    3 => null  ]}```Invalid references are ignored instead of replaced by `null` when they are part of a collection argument.If the collection argument is part of a method call and contains an invalid reference, the method call is kept, but the invalid reference removed.The behavior stays the same as before for non-collection arguments.:christmas_tree:Commits-------cfc4879 [DependencyInjection] Properly ignore invalid reference arguments in collection arguments
jderusse pushed a commit to jderusse/symfony that referenced this pull requestMar 30, 2020
derrabus pushed a commit to derrabus/symfony that referenced this pull requestJul 25, 2023
This PR was merged into the 1.1 branch.Discussion----------Fixed createResponseCommits-------580de38 Fixed createResponse
fabpot added a commit that referenced this pull requestJul 30, 2023
…repo (fabpot, dunglas, KorvinSzanto, xabbuh, aimeos, ahundiak, Danielss89, rougin, csunolgomez, Jérôme Parmentier, mtibben, Nyholm, ajgarlag, uphlewis, samnela, grachevko, nicolas-grekas, tinyroy, danizord, Daniel Degasperi, rbaarsma, Ekman, 4rthem, derrabus, mleczakm, iluuu1994, Tobion, chalasr, lemon-juice, franmomu, cidosx, erikn69, AurelienPillevesse)This PR was merged into the 6.4 branch.Discussion----------[PsrHttpMessageBridge] Import the bridge into the monorepo| Q             | A| ------------- | ---| Branch?       | 6.4| Bug fix?      | no| New feature?  | yes| Deprecations? | no| Tickets       | N/A| License       | MIT| Doc PR        | TODO⚠️ Don't squash!I propose to import the `symfony/psr-http-message-bridge` package into the Symfony monorepo for further maintenance.Commits-------e40dd66 [PsrHttpMessageBridge] Patch return types and fix CS266c09f [PsrHttpMessageBridge] Import the bridge into the monorepo0c0323a Add 'src/Symfony/Bridge/PsrHttpMessage/' from commit '581ca6067eb62640de5ff08ee1ba6850a0ee472e'581ca60 Prepare release 2.3.145d0349 Fix CS6410dda bug#122 Don't rely on Request::getPayload() to populate the parsed body (nicolas-grekas)ef03b6d Don't rely on Request::getPayload() to populate the parsed body3c62b81 minor#120 Prepare release 2.3.0 (derrabus)96acbfd Prepare release 2.3.07eedd34 feature#119 Implement ValueResolverInterface (derrabus)0b54b85 Implement ValueResolverInterface6b2f5df feature#117 Leverage `Request::getPayload()` to populate the parsed body of PSR-7 requests (AurelienPillevesse)3a8caad Leverage `Request::getPayload()` to populate the parsed body of PSR-7 requests18c9e82 minor#118 Add native types where possible (derrabus)4fd4323 Add native types where possible28a732c minor#115 Prepare the 2.2.0 release (derrabus)7944831 cs fix99ddcaa Prepare the 2.2.0 release8a5748d feature#113 Bump psr/http-message version (erikn69)ec83c1c Bump psr/http-message version694016e feature#114 Drop support for Symfony 4 (derrabus)b360b35 Drop support for Symfony 4998d8d2 minor#111 Adjustments for PHP CS Fixer 3 (derrabus)5fa5f62 Adjustments for PHP CS Fixer 3a125b93 minor#110 Add PHP 8.2 to CI (derrabus)4592df2 Add PHP 8.2 to CI4617ac3 bug#109 perf: ensure timely flush stream buffers (cidosx)8c8a75b perf: ensure timely flush stream buffersd444f85 Update changelog155a7ae bug#107 Ignore invalid HTTP headers when creating PSR7 objects (nicolas-grekas)9a78a16 Ignore invalid HTTP headers when creating PSR7 objectsbdb2871 minor#104 Add missing .gitattributes (franmomu)808561a Add missing .gitattributes316f5cb bug#103 Fix for wrong type passed to moveTo() (lemon-juice)7f3b5c1 Fix for wrong type passed to moveTo()22b37c8 minor#101 Release v2.1.2 (chalasr)c382d76 Release v2.1.2c81476c feature#100 Allow Symfony 6 (chalasr)c7a0be3 Allow Symfony 6df83a38 minor#98 Add PHP 8.1 to CI (derrabus)b2bd334 Add PHP 8.1 to CI824711c minor#99 Add return types to fixtures (derrabus)f8f70fa Add return types to fixturesd558dcd minor#97 Inline $tmpDir (derrabus)d152649 Inline $tmpDirf12a9e6 minor#96 Run PHPUnit on GitHub Actions (derrabus)ab64c69 Run PHPUnit on GitHub Actionsc901299 bug#95 Allow `psr/log` 2 and 3 (derrabus)8e13ae4 Allow psr/log 2 and 326068fa Minor cleanups87fabb9 Fix copyright year3d9241f minor#92 remove link to sensio extra bundle which removed psr7 support (Tobion)7078739 remove link to sensio extra bundle which removed psr7 support81db2d4 feature#89 PSR HTTP message converters for controllers (derrabus)aa26e61 PSR HTTP message converters for controllerse62b239 minor#91 Fix CS (derrabus)2bead22 Fix CS488df9b minor#90 Fix CI failures with Xdebug 3 and test on PHP 7.4/8.0 as well (derrabus)a6697fd Fix CI failures with Xdebug 3 and test on PHP 7.4/8.0 as wellc62f7d0 Update branch-alias51a21cb Update changeloga20fff9 bug#87 Fix populating server params from URI in HttpFoundationFactory (nicolas-grekas)4933e04 bug#86 Create cookies as raw in HttpFoundationFactory (nicolas-grekas)66095a5 Fix populating server params from URI in HttpFoundationFactory42cca49 Create cookies as raw in HttpFoundationFactorycffb3a8 bug#85 Fix BinaryFileResponse with range to psr response conversion (iluuu1994)5d5932d Fix BinaryFileResponse with range to psr response conversione44f249 bug#81 Don't normalize query string in PsrHttpFactory (nicolas-grekas)bc25829 Don't normalize query string in PsrHttpFactorydf735ec bug#78 Fix populating default port and headers in HttpFoundationFactory (mleczakm)4f30401 Fix populating default port and headers in HttpFoundationFactory1309b64 bug#77 fix conversion for https requests (4rthem)e86de3f minor#79 Allow installation on php 8 (derrabus)9243f93 Allow installation on php 8.d336c73 fix conversion for https requests126903c Fix format of CHANGELOG.mdce709cd feature#75 Remove deprecated code (fabpot)dfc5238 Remove deprecated code9d3e80d bug#72 Use adapter for UploadedFile objects (nicolas-grekas)a4f9f6d Use adapter for UploadedFile objectsec7892b Fix CHANGELOG, bump branch-alias7ab4fe4 minor#70 Updated CHANGELOG (rbaarsma)9ad4bcc Updated CHANGELOGc4c904a minor#71 Cleanup after bump to Symfony v4.4 (nicolas-grekas)e9a9557 Cleanup after bump to Symfony v4.43d10a6c feature#66 Add support for streamed Symfony request (Ekman)df26630 Add support for streamed Symfony request5aa8ca9 bug#69 Allow Symfony 5.0 (rbaarsma)1158149 Allow Symfony 5.081ae86d Merge branch '1.1'a33352a bug#64 Fixed createResponse (ddegasperi)7a4b449 minor#65 Fix tests (ajgarlag)19905b0 Fix tests580de38 Fixed createResponse9ab9d71 minor#63 Added links to documentation (Nyholm)59b9406 Added links to documentationc1cb51c feature#50 Add support for streamed response (danizord)4133c7a bug#48 Convert Request/Response multiple times (Nyholm)8564bf7 Convert Request/Response multiple times7cc1605 Add support for streamed responseaebc14b feature#62 bump to PHP 7.1 (nicolas-grekas)8e10923 bump to PHP 7.15e5e0c3 Revert "Undeprecate DiactorosFactory for 1.1"921f866 Undeprecate DiactorosFactory for 1.18592ca3 bug#61 removed 'Set-Cookie' from header when it is already converted to a Symfony header cookie (tinyroy)dd1111e removed 'Set-Cookie' from header when it is already converted to a Symfony header cookieba672d8 bump branch-alias5f9a032 typof2c48c5 fix tests3a52e44 bug#59 Fix SameSite attribute conversion from PSR7 to HttpFoundation (ajgarlag)5ee1f8f Fix SameSite attribute conversion from PSR7 to HttpFoundationf6d7d3a bug#58 [Bugfix] Typo header set-sookie (grachevko)16eb6e1 minor#57 Excluded tests from classmap (samnela)36a8065 Deprecate DiactorosFactory, use nyholm/psr7 for tests5076934 bug#54Fix#51 (compatability issue with zendframework/zend-diactoros ^2.0) (uphlewis)757ea81 [Bugfix] Typo header set-sookie25f9c3a Excluded tests from classmap8ff61e5 Fix compatability issue with "zendframework/zend-diactoros": "^2.0." (#51)53c15a6 updated CHANGELOGc821241 bumped version to 1.1f26d01f minor#47 Updated changelog (Nyholm)c2282e3 Updated changelogeddd6c8 feature#43 Create PSR-7 messages using PSR-17 factories (ajgarlag)dd81b4b Create PSR-7 messages using PSR-17 factoriesf11f173 feature#45 Fixed broken build (Nyholm)8780dd3 Fixed broken buildc2b7579 bug#30 Fix the request target in PSR7 Request (mtibben)94fcfa5 Fix the request target in PSR7 Request64640ee minor#38 Run PHP 5.3 tests on Precise (Lctrs)64c0cb0 Run PHP 5.3 tests on Preciseb209840 minor#32 Allow Symfony 4 (dunglas)97635f1 Allow Symfony 4147a238 minor#31 test suite compatibility with PHPUnit 6 (xabbuh)f5c46f0 test suite compatibility with PHPUnit 666085f2 preparing 1.0 release533d3e4 added a CHANGELOG for 1.014269f9 bug#28 Fix REQUEST_METHOD on symfony request (csunol)98ab85a Fix REQUEST_METHOD on symfony request29be4f8 updated LICENCE yeard2db47c removed obsolete CHANGELOG file1c30b17 bug#22Fixes#16 Symfony Request created without any URI (rougin)a59c572Fixes#16 Symfony Request created without any URI7a5aa92 bug#23Fixes#9 Bridge error when no file is selected (ahundiak, Danielss89)a1a631a Update assert error messagee5d62e6 Fixes based on code-review101b608 Handles null file in createrequest bridge.d16c63c bug#18 Allow multiple calls to Request::getContent() (aimeos)9624b8b Allow multiple calls to Request::getContent()9c747c4 Merge pull request#19 from xabbuh/travis-configa388c43 update Travis CI configurationac5cd86 minor#14 Remove use of deprecated 'deep' parameter in tests (KorvinSzanto)305c0fe Remove use of deprecated 'deep' parameter3664dc0 minor#7 Test Diactoros Factory with PHP 5.4 (dunglas)bab1530 Test Diactoros Factory with PHP 5.4d7660b8 Suggest psr/http-message-implementationdc7e308 removed the branch alias for now as we are pre 1.03f8977e feature#1 Initial support (dunglas)ca41146 Initial support01b110b added the initial set of files
stobrien89 pushed a commit to stobrien89/symfony that referenced this pull requestFeb 27, 2025
This pull request wasclosed.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

19 participants
@jmikola@weaverryan@stof@fabpot@ornicar@pborreli@ncuesta@kriswallsmith@johnkary@hidenorigoto@javiereguiluz@schmittjoh@lsmith77@marphi@merk@marcw@DuoSRX@avalanche123@subsven

[8]ページ先頭

©2009-2025 Movatter.jp