Skip to content

Commit 95dfa93

Browse files
Merge branch '4.0'
* 4.0: (23 commits) Clean up Update return type in docblock. PHP CS Fixer: no need to exclude xml and yml files PHP CS Fixer: no need to exclude json file [symfony#22749] fix version in changelog Update LICENSE year... forever fixed some deprecation messages fixed CS Fixes for Oracle in PdoSessionHandler fixed some deprecation messages fixed some deprecation messages fixed some deprecation messages fixed some deprecation messages Remove dead code [TwigBundle/Brige] catch missing requirements to throw meaningful exceptions [DI] fix CS [HttpKernel] Call Response->setPrivate() instead of sending raw header() when session is started [FrameworkBundle] Make cache:clear "atomic" and consistent with cache:warmup Suggest to write an implementation if the interface cannot be autowired [Debug] Skip DebugClassLoader checks for already parsed files ...
2 parents 170ab63 + f9fdb22 commit 95dfa93

File tree

90 files changed

+520
-214
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+520
-214
lines changed

.php_cs.dist

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,9 @@ return PhpCsFixer\Config::create()
3232
))
3333
// file content autogenerated by `var_export`
3434
->notPath('Symfony/Component/Translation/Tests/fixtures/resources.php')
35-
// autogenerated xmls
36-
->notPath('Symfony/Component/Console/Tests/Fixtures/application_1.xml')
37-
->notPath('Symfony/Component/Console/Tests/Fixtures/application_2.xml')
38-
// yml
39-
->notPath('Symfony/Component/Yaml/Tests/Fixtures/sfTests.yml')
4035
// test template
4136
->notPath('Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/Resources/Custom/_name_entry_label.html.php')
4237
// explicit heredoc test
4338
->notPath('Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Resources/views/translation.html.php')
44-
// purposefully invalid JSON
45-
->notPath('Symfony/Component/Asset/Tests/fixtures/manifest-invalid.json')
4639
)
4740
;

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2004-2017 Fabien Potencier
1+
Copyright (c) 2004-present Fabien Potencier
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

src/Symfony/Bridge/Doctrine/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2004-2017 Fabien Potencier
1+
Copyright (c) 2004-present Fabien Potencier
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

src/Symfony/Bridge/Monolog/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2004-2017 Fabien Potencier
1+
Copyright (c) 2004-present Fabien Potencier
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

src/Symfony/Bridge/PhpUnit/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2014-2017 Fabien Potencier
1+
Copyright (c) 2014-present Fabien Potencier
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

src/Symfony/Bridge/PhpUnit/Tests/CoverageListenerTest.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@ public function test()
1212
$this->markTestSkipped('This test cannot be run on Windows.');
1313
}
1414

15-
if (defined('HHVM_VERSION')) {
16-
$this->markTestSkipped('This test cannot be run on HHVM.');
17-
}
18-
1915
if (\PHP_VERSION_ID >= 70000) {
2016
$php = 'phpdbg -qrr';
2117
} else {

src/Symfony/Bridge/ProxyManager/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2004-2017 Fabien Potencier
1+
Copyright (c) 2004-present Fabien Potencier
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

src/Symfony/Bridge/Twig/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2004-2017 Fabien Potencier
1+
Copyright (c) 2004-present Fabien Potencier
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <[email protected]>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
12+
namespace Symfony\Bridge\Twig;
13+
14+
use Twig\Error\SyntaxError;
15+
16+
/**
17+
* @internal
18+
*/
19+
class UndefinedCallableHandler
20+
{
21+
private static $filterComponents = array(
22+
'humanize' => 'form',
23+
'trans' => 'translation',
24+
'transchoice' => 'translation',
25+
'yaml_encode' => 'yaml',
26+
'yaml_dump' => 'yaml',
27+
);
28+
29+
private static $functionComponents = array(
30+
'asset' => 'asset',
31+
'asset_version' => 'asset',
32+
'dump' => 'debug-bundle',
33+
'expression' => 'expression-language',
34+
'form_widget' => 'form',
35+
'form_errors' => 'form',
36+
'form_label' => 'form',
37+
'form_row' => 'form',
38+
'form_rest' => 'form',
39+
'form' => 'form',
40+
'form_start' => 'form',
41+
'form_end' => 'form',
42+
'csrf_token' => 'form',
43+
'logout_url' => 'security-http',
44+
'logout_path' => 'security-http',
45+
'is_granted' => 'security-core',
46+
'link' => 'web-link',
47+
'preload' => 'web-link',
48+
'dns_prefetch' => 'web-link',
49+
'preconnect' => 'web-link',
50+
'prefetch' => 'web-link',
51+
'prerender' => 'web-link',
52+
'workflow_can' => 'workflow',
53+
'workflow_transitions' => 'workflow',
54+
'workflow_has_marked_place' => 'workflow',
55+
'workflow_marked_places' => 'workflow',
56+
);
57+
58+
public static function onUndefinedFilter($name)
59+
{
60+
if (!isset(self::$filterComponents[$name])) {
61+
return false;
62+
}
63+
64+
// Twig will append the source context to the message, so that it will end up being like "[...] Unknown filter "%s" in foo.html.twig on line 123."
65+
throw new SyntaxError(sprintf('Did you forget to run "composer require symfony/%s"? Unknown filter "%s".', $name, self::$filterComponents[$name]));
66+
}
67+
68+
public static function onUndefinedFunction($name)
69+
{
70+
if (!isset(self::$functionComponents[$name])) {
71+
return false;
72+
}
73+
74+
throw new SyntaxError(sprintf('Did you forget to run "composer require symfony/%s"? Unknown function "%s".', $name, self::$functionComponents[$name]));
75+
}
76+
}

src/Symfony/Bundle/DebugBundle/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2014-2017 Fabien Potencier
1+
Copyright (c) 2014-present Fabien Potencier
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

0 commit comments

Comments
 (0)