8000 Prepare for PHP 7.4 preload by nicolas-grekas · Pull Request #32054 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Prepare for PHP 7.4 preload #32054

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

Merged
merged 1 commit into from
Jun 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php

/*
* This file is part of the Symfony package.
*
* (c) 8000 Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Symfony\Bundle\FrameworkBundle\DependencyInjection;

use Symfony\Contracts\Service\ServiceSubscriberInterface;

/**
* @internal
*/
interface CompatibilityServiceSubscriberInterface extends ServiceSubscriberInterface
{
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php

/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Symfony\Bundle\FrameworkBundle\DependencyInjection;

use Symfony\Component\DependencyInjection\ServiceSubscriberInterface as LegacyServiceSubscriberInterface;

/**
* @internal
*/
interface CompatibilityServiceSubscriberInterface extends LegacyServiceSubscriberInterface
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,9 @@
namespace Symfony\Bundle\FrameworkBundle\DependencyInjection;

use Symfony\Component\DependencyInjection\ServiceSubscriberInterface as LegacyServiceSubscriberInterface;
use Symfony\Contracts\Service\ServiceSubscriberInterface;

if (interface_exists(LegacyServiceSubscriberInterface::class)) {
/**
* @internal
*/
interface CompatibilityServiceSubscriberInterface extends LegacyServiceSubscriberInterface
{
}
require __DIR__.\DIRECTORY_SEPARATOR.'CompatibilityServiceSubscriberInterface.legacy.php';
} else {
/**
* @internal
*/
interface CompatibilityServiceSubscriberInterface extends ServiceSubscriberInterface
{
}
require __DIR__.\DIRECTORY_SEPARATOR.'CompatibilityServiceSubscriberInterface.contracts.php';
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php

/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Symfony\Bundle\TwigBundle\DependencyInjection;

use Symfony\Contracts\Service\ServiceSubscriberInterface;

/**
* @internal
*/
interface CompatibilityServiceSubscriberInterface extends ServiceSubscriberInterface
{
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php

/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Symfony\Bundle\TwigBundle\DependencyInjection;

use Symfony\Component\DependencyInjection\ServiceSubscriberInterface as LegacyServiceSubscriberInterface;

/**
* @internal
*/
interface CompatibilityServiceSubscriberInterface extends LegacyServiceSubscriberInterface
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,9 @@
namespace Symfony\Bundle\TwigBundle\DependencyInjection;

use Symfony\Component\DependencyInjection\ServiceSubscriberInterface as LegacyServiceSubscriberInterface;
use Symfony\Contracts\Service\ServiceSubscriberInterface;

if (interface_exists(LegacyServiceSubscriberInterface::class)) {
/**
* @internal
*/
interface CompatibilityServiceSubscriberInterface extends LegacyServiceSubscriberInterface
{
}
require __DIR__.\DIRECTORY_SEPARATOR.'CompatibilityServiceSubscriberInterface.legacy.php';
} else {
/**
* @internal
*/
interface CompatibilityServiceSubscriberInterface extends ServiceSubscriberInterface
{
}
require __DIR__.\DIRECTORY_SEPARATOR.'CompatibilityServiceSubscriberInterface.contracts.php';
}
19 changes: 19 additions & 0 deletions src/Symfony/Component/Cache/Exception/CacheException+psr16.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Symfony\Component\Cache\Exception;

use Psr\Cache\CacheException as Psr6CacheInterface;
use Psr\SimpleCache\CacheException as SimpleCacheInterface;

class CacheException extends \Exception implements Psr6CacheInterface, SimpleCacheInterface
{
}
18 changes: 18 additions & 0 deletions src/Symfony/Component/Cache/Exception/CacheException-psr16.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Symfony\Component\Cache\Exception;

use Psr\Cache\CacheException as Psr6CacheInterface;

class CacheException extends \Exception implements Psr6CacheInterface
{
}
9 changes: 2 additions & 7 deletions src/Symfony/Component/Cache/Exception/CacheException.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,10 @@

namespace Symfony\Component\Cache\Exception;

use Psr\Cache\CacheException as Psr6CacheInterface;
use Psr\SimpleCache\CacheException as SimpleCacheInterface;

if (interface_exists(SimpleCacheInterface::class)) {
class CacheException extends \Exception implements Psr6CacheInterface, SimpleCacheInterface
{
}
require __DIR__.\DIRECTORY_SEPARATOR.'CacheException+psr16.php';
} else {
class CacheException extends \Exception implements Psr6CacheInterface
{
}
require __DIR__.\DIRECTORY_SEPARATOR.'CacheException-psr16.php';
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Symfony\Component\Cache\Exception;

use Psr\Cache\InvalidArgumentException as Psr6CacheInterface;
use Psr\SimpleCache\InvalidArgumentException as SimpleCacheInterface;

class InvalidArgumentException extends \InvalidArgumentException implements Psr6CacheInterface, SimpleCacheInterface
{
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Symfony\Component\Cache\Exception;

use Psr\Cache\InvalidArgumentException as Psr6CacheInterface;

class InvalidArgumentException extends \InvalidArgumentException implements Psr6CacheInterface
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,10 @@

namespace Symfony\Component\Cache\Exception;

use Psr\Cache\InvalidArgumentException as Psr6CacheInterface;
use Psr\SimpleCache\InvalidArgumentException as SimpleCacheInterface;

if (interface_exists(SimpleCacheInterface::class)) {
class InvalidArgumentException extends \InvalidArgumentException implements Psr6CacheInterface, SimpleCacheInterface
{
}
require __DIR__.\DIRECTORY_SEPARATOR.'InvalidArgumentException+psr16.php';
} else {
class InvalidArgumentException extends \InvalidArgumentException implements Psr6CacheInterface
{
}
require __DIR__.\DIRECTORY_SEPARATOR.'InvalidArgumentException-psr16.php';
}
19 changes: 19 additions & 0 deletions src/Symfony/Component/Cache/Exception/LogicException+psr16.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Symfony\Component\Cache\Exception;

use Psr\Cache\CacheException as Psr6CacheInterface;
use Psr\SimpleCache\CacheException as SimpleCacheInterface;

class LogicException extends \LogicException implements Psr6CacheInterface, SimpleCacheInterface
{
}
18 changes: 18 additions & 0 deletions src/Symfony/Component/Cache/Exception/LogicException-psr16.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Symfony\Component\Cache\Exception;

use Psr\Cache\CacheException as Psr6CacheInterface;

class LogicException extends \LogicException implements Psr6CacheInterface
{
}
11 changes: 3 additions & 8 deletions src/Symfony/Component/Cache/Exception/LogicException.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,10 @@

namespace Symfony\Component\Cache\Exception;

use Psr\Cache\CacheException as Psr6CacheInterface;
use Psr\SimpleCache\CacheException as SimpleCacheInterface;
use Psr\SimpleCache\LogicException as SimpleCacheInterface;

if (interface_exists(SimpleCacheInterface::class)) {
class LogicException extends \LogicException implements Psr6CacheInterface, SimpleCacheInterface
{
}
require __DIR__.\DIRECTORY_SEPARATOR.'LogicException-psr16.php';
Copy link
Contributor

Choose a reason for hiding this comment

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

@nicolas-grekas Shouldn't this be:

require __DIR__.\DIRECTORY_SEPARATOR.'LogicException+psr16.php';

Copy link
Member Author
@nicolas-grekas nicolas-grekas Jun 18, 2019

Choose a reason for hiding this comment

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

oops you're right, could you please send a PR on branch 4.4 to fix it?

Copy link
Contributor

Choose a reason for hiding this comment

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

Done, I hope I did it right.
#32082

} else {
class LogicException extends \LogicException implements Psr6CacheInterface
{
}
require __DIR__.\DIRECTORY_SEPARATOR.'LogicException-psr16.php';
}
54 changes: 54 additions & 0 deletions src/Symfony/Contracts/EventDispatcher/Event+psr14.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<?php

/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Symfony\Contracts\EventDispatcher;

use Psr\EventDispatcher\StoppableEventInterface;

/**
* Event is the base class for classes containing event data.
*
* This class contains no event data. It is used by events that do not pass
* state information to an event handler when an event is raised.
*
* You can call the method stopPropagation() to abort the execution of
* further listeners in your event listener.
*
* @author Guilherme Blanco <guilhermeblanco@hotmail.com>
* @author Jonathan Wage <jonwage@gmail.com>
* @author Roman Borschel <roman@code-factory.org>
* @author Bernhard Schussek <bschussek@gmail.com>
* @author Nicolas Grekas <p@tchwork.com>
*/
class Event implements StoppableEventInterface
{
private $propagationStopped = false;

/**
* Returns whether further event listeners should be triggered.
*/
public function isPropagationStopped(): bool
{
return $this->propagationStopped;
}

/**
* Stops the propagation of the event to further event listeners.
*
* If multiple event listeners are connected to the same event, no
* further event listener will be triggered once any trigger calls
* stopPropagation().
*/
public function stopPropagation(): void
{
$this->propagationStopped = true;
}
}
Loading
0