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

removed all *.class parameters#14070

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

Merged
fabpot merged 1 commit intosymfony:masterfromfabpot:class-parametres-removal
Mar 26, 2015

Conversation

fabpot
Copy link
Member

QA
Bug fix?no
New feature?no
BC breaks?yes
Deprecations?no
Tests pass?no
Fixed tickets#11881,#12822
LicenseMIT
Doc PRnone

TomasVotruba reacted with thumbs up emoji
@fabpot
Copy link
MemberAuthor

Here is the script I used:

<?phprequire_once__DIR__.'/vendor/autoload.php';useSymfony\Component\Finder\Finder;$finder = (newFinder())->name('*.xml')->in(__DIR__.'/src');$values =array();foreach ($finderas$file) {$contents =file_get_contents($file);$new =preg_replace_callback("{^ +<parameter key=\"([^\"]+)\.class\">([^<]+)</parameter>\n}m",function ($match)use (&$values) {$values['%'.$match[1].'.class%'] =$match[2];    },$contents);$new =preg_replace("{^ +<parameters>\s+</parameters>\n\n}sm",'',$new);$new =preg_replace("{</parameter>\s+</parameters>}s","</parameter>\n    </parameters>",$new);$new =preg_replace("{<parameters>\s+    <parameter}s","<parameters>\n        <parameter",$new);if ($new !=$contents) {file_put_contents($file,$new);    }}$finder = (newFinder())->in(__DIR__.'/src');foreach ($finderas$file) {$contents =file_get_contents($file);$new =preg_replace_callback('{%[a-zA-Z0-9\._]+\.class%}',function ($match)use ($values) {returnisset($values[$match[0]]) ?$values[$match[0]] :$match[0];    },$contents);if ($new !=$contents) {file_put_contents($file,$new);    }}

@TomasVotruba
Copy link
Contributor

👍

@@ -30,8 +30,6 @@ public function testLoadEmptyConfiguration()
$container->loadFromExtension('twig', array());
$this->compileContainer($container);

$this->assertEquals('Twig_Environment', $container->getParameter('twig.class'), '->load() loads the twig.xml file');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I guess this tests needs to be replaced by testing whether thetwig service is defined to keep that test

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

fixed

@Tobion
Copy link
Contributor

Apart from the two small things looks ok to me.

@fabpotfabpotforce-pushed theclass-parametres-removal branch fromebf5eca to8835d1aCompareMarch 26, 2015 15:34
@Tobion
Copy link
Contributor

👍

@fabpotfabpot merged commit8835d1a intosymfony:masterMar 26, 2015
fabpot added a commit that referenced this pull requestMar 26, 2015
This PR was merged into the 3.0-dev branch.Discussion----------removed all *.class parameters| Q             | A| ------------- | ---| Bug fix?      | no| New feature?  | no| BC breaks?    | yes| Deprecations? | no| Tests pass?   | no| Fixed tickets |#11881,#12822| License       | MIT| Doc PR        | noneCommits-------8835d1a removed all *.class parameters
@fabpotfabpot mentioned this pull requestNov 16, 2015
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.

5 participants
@fabpot@TomasVotruba@Tobion@stof@nio

[8]ページ先頭

©2009-2025 Movatter.jp