Symfony achieves 100% PHP7 compatibility

PHP7, the new version of the programming language Symfony is built with, will be released at the end of the year. The recent release of its third beta has brought us another step closer to the final stable release.
During these last past months, we've been working very hard to achieve full PHP7 compatibility. This effort accelerated during the past weeks and we're glad to announce that all Symfony maintained branches are now 100% compatible with PHP7.
Our PHP7 compatibility journey started on February 2015, when Nicolas Grekas
added php: nightly
to the list of tested PHP engines on Travis CI
(see commit).
After that, a lot of pull requests
followed to fix PHP7 compatibility for Symfony components.
Some of these changes were related to the new reserved keywords, which prevents
you from using int
, float
, bool
, string
, true
, false
and
null
as the name of your classes (see PR #14472).
This forced us to rename the Null
, True
and False
constraints
(see PR #14228).
Another big change was related to the new Throwable
interface introduced by
PHP7 and which is implemented by all the internal error and exception classes.
Our exception handler needed to be updated for this new interface
(see PR #14959).
Lastly, we've just removed php: nightly
from the list of PHP engines which
can silently fail. This means that Symfony no longer accepts changes that break
PHP7 compatibility, not even in the master branch where the upcoming Symfony 3
is being developed.
Help the Symfony project!
As with any Open-Source project, contributing code or documentation is the most common way to help, but we also have a wide range of sponsoring opportunities.
Comments
Comments are closed.
To ensure that comments stay relevant, they are closed for old posts.
----------------------------------
Wow. This was expected from Symfony .
English:Symfony is awesome bro.
$ all [0] -> name should be changed to $ all [0] -> namespace
Yml files so that multiple entities operating normally generate code to generate Repository.php
repositoryClass: SharedModel\TestRepository
php app / console doctrine: generate: entities
public function findNamespaceAndPathForMetadata(ClassMetadataCollection $metadata, $path = null)
{
$all = $metadata->getMetadata();
if (class_exists($all[0]->namespace)) {
$r = new \ReflectionClass($all[0]->namespace);
$path = $this->getBasePathForClass($r->getName(), $r->getNamespaceName(), dirname($r->getFilename()));
} elseif (!$path) {
throw new \RuntimeException(sprintf('Unable to determine where to save the "%s" class (use the --path option).', $all[0]->name));
}
$metadata->setPath($path);
$metadata->setNamespace(isset($r) ? $r->getNamespaceName() : $all[0]->namespace);
}
"The service "twig" has a dependency on a non-existent service "assetic.twig_extension"." this is the error that i got...
any help?