8000 Merge branch '4.4' · symfony/symfony@16ff6ee · GitHub
[go: up one dir, main page]

Skip to content

Commit 16ff6ee

Browse files
committed
Merge branch '4.4'
* 4.4: Revert "minor #32054 Prepare for PHP 7.4 preload (nicolas-grekas)"
2 parents 409ccd1 + dca9325 commit 16ff6ee

15 files changed

+140
-296
lines changed

src/Symfony/Component/Cache/Exception/CacheException+psr16.php

Lines changed: 0 additions & 19 deletions
This file was deleted.

src/Symfony/Component/Cache/Exception/CacheException-psr16.php

Lines changed: 0 additions & 18 deletions
This file was deleted.

src/Symfony/Component/Cache/Exception/CacheException.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,15 @@
1111

1212
namespace Symfony\Component\Cache\Exception;
1313

14+
use Psr\Cache\CacheException as Psr6CacheInterface;
1415
use Psr\SimpleCache\CacheException as SimpleCacheInterface;
1516

1617
if (interface_exists(SimpleCacheInterface::class)) {
17-
require __DIR__.\DIRECTORY_SEPARATOR.'CacheException+psr16.php';
18+
class CacheException extends \Exception implements Psr6CacheInterface, SimpleCacheInterface
19+
{
20+
}
1821
} else {
19-
require __DIR__.\DIRECTORY_SEPARATOR.'CacheException-psr16.php';
22+
class CacheException extends \Exception implements Psr6CacheInterface
23+
{
24+
}
2025
}

src/Symfony/Component/Cache/Exception/InvalidArgumentException+psr16.php

Lines changed: 0 additions & 19 deletions
This file was deleted.

src/Symfony/Component/Cache/Exception/InvalidArgumentException-psr16.php

Lines changed: 0 additions & 18 deletions
This file was deleted.

src/Symfony/Component/Cache/Exception/InvalidArgumentException.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,15 @@
1111

1212
namespace Symfony\Component\Cache\Exception;
1313

14+
use Psr\Cache\InvalidArgumentException as Psr6CacheInterface;
1415
use Psr\SimpleCache\InvalidArgumentException as SimpleCacheInterface;
1516

1617
if (interface_exists(SimpleCacheInterface::class)) {
17-
require __DIR__.\DIRECTORY_SEPARATOR.'InvalidArgumentException+psr16.php';
18+
class InvalidArgumentException extends \InvalidArgumentException implements Psr6CacheInterface, SimpleCacheInterface
19+
{
20+
}
1821
} else {
19-
require __DIR__.\DIRECTORY_SEPARATOR.'InvalidArgumentException-psr16.php';
22+
class InvalidArgumentException extends \InvalidArgumentException implements Psr6CacheInterface
23+
{
24+
}
2025
}

src/Symfony/Component/Cache/Exception/LogicException+psr16.php

Lines changed: 0 additions & 19 deletions
This file was deleted.

src/Symfony/Component/Cache/Exception/LogicException-psr16.php

Lines changed: 0 additions & 18 deletions
This file was deleted.

src/Symfony/Component/Cache/Exception/LogicException.php

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,15 @@
1111

1212
namespace Symfony\Component\Cache\Exception;
1313

14-
use Psr\SimpleC 685C ache\LogicException as SimpleCacheInterface;
14+
use Psr\Cache\CacheException as Psr6CacheInterface;
15+
use Psr\SimpleCache\CacheException as SimpleCacheInterface;
1516

1617
if (interface_exists(SimpleCacheInterface::class)) {
17-
require __DIR__.\DIRECTORY_SEPARATOR.'LogicException+psr16.php';
18+
class LogicException extends \LogicException implements Psr6CacheInterface, SimpleCacheInterface
19+
{
20+
}
1821
} else {
19-
require __DIR__.\DIRECTORY_SEPARATOR.'LogicException-psr16.php';
22+
class LogicException extends \LogicException implements Psr6CacheInterface
23+
{
24+
}
2025
}

src/Symfony/Contracts/EventDispatcher/Event+psr14.php

Lines changed: 0 additions & 54 deletions
This file was deleted.

src/Symfony/Contracts/EventDispatcher/Event-psr14.php

Lines changed: 0 additions & 52 deletions
This file was deleted.

src/Symfony/Contracts/EventDispatcher/Event.php

Lines changed: 78 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,83 @@
1414
use Psr\EventDispatcher\StoppableEventInterface;
1515

1616
if (interface_exists(StoppableEventInterface::class)) {
17-
require __DIR__.\DIRECTORY_SEPARATOR.'Event+psr14.php';
17+
/**
18+
* Event is the base class for classes containing event data.
19+
*
20+
* This class contains no event data. It is used by events that do not pass
21+
* state information to an event handler when an event is raised.
22+
*
23+
* You can call the method stopPropagation() to abort the execution of
24+
* further listeners in your event listener.
25+
*
26+
* @author Guilherme Blanco <guilhermeblanco@hotmail.com>
27+
* @author Jonathan Wage <jonwage@gmail.com>
28+
* @author Roman Borschel <roman@code-factory.org>
29+
* @author Bernhard Schussek <bschussek@gmail.com>
30+
* @author Nicolas Grekas <p@tchwork.com>
31+
*/
32+
class Event implements StoppableEventInterface
33+
{
34+
private $propagationStopped = false;
35+
36+
/**
37+
* Returns whether further event listeners should be triggered.
38+
*/
39+
public function isPropagationStopped(): bool
40+
{
41+
return $this->propagationStopped;
42+
}
43+
44+
/**
45+
* Stops the propagation of the event to further event listeners.
46+
*
47+
* If multiple event listeners are connected to the same event, no
48+
* further event listener will be triggered once any trigger calls
49+
* stopPropagation().
50+
*/
51+
public function stopPropagation(): void
52+
{
53+
$this->propagationStopped = true;
54+
}
55+
}
1856
} else {
19-
require __DIR__.\DIRECTORY_SEPARATOR.'Event-psr14.php';
57+
/**
58+
* Event is the base class for classes containing event data.
59+
*
60+
* This class contains no event data. It is used by events that do not pass
61+
* state information to an event handler when an event is raised.
62+
*
63+
* You can call the method stopPropagation() to abort the execution of
64+
* further listeners in your event listener.
65+
*
66+
* @author Guilherme Blanco <guilhermeblanco@hotmail.com>
67+
* @author Jonathan Wage <jonwage@gmail.com>
68+
* @author Roman Borschel <roman@code-factory.org>
69+
* @author Bernhard Schussek <bschussek@gmail.com>
70+
* @author Nicolas Grekas <p@tchwork.com>
71+
*/
72+
class Event
73+
{
74+
private $propagationStopped = false;
75+
76+
/**
77+
* Returns whether further event listeners should be triggered.
78+
*/
79+
public function isPropagationStopped(): bool
80+
{
81+
return $this->propagationStopped;
82+
}
83+
84+
/**
85+
* Stops the propagation of the event to further event listeners.
86+
*
87+
* If multiple event listeners are connected to the same event, no
88+
* further event listener will be triggered once any trigger calls
89+
* stopPropagation().
90+
*/
91+
public function stopPropagation(): void
92+
{
93+
$this->propagationStopped = true;
94+
}
95+
}
2096
}

0 commit comments

Comments
 (0)
0