Acessadores de propriedade, interseçÔes de tipo e constantes finais sĂŁo oficialmente propostas para o PHP 8.1, e mais duas RFCs jĂĄ foram adotadas. TambĂ©m no lançamento estĂŁo uma porção de ferramentas, vĂdeos, podcasts, artigos, notĂcias da comunidade.
Gostar de ler!
notĂcias
- PHP 7.4.19 , PHP 8.0.6 - Corrigido bug em PDO_pgsql.
- EstatĂsticas da versĂŁo do PHP - 2021.1 - Coleção tradicional de estatĂsticas com base nos dados que o Composer envia ao conectar-se a packagist.org.
- PHP 7.4: 45.92% (+3.31)
- PHP 7.3: 21.30% (-5.75)
- PHP 7.2: 12.89% (-2.39)
- PHP 8.0: 9.44% (+9.17)
- PHP 7.1: 5.21% (-2.24)
- Phalcon Roadmap â , v5 . : PHP + . PHP, .
- :
- 18 , 3- PHP- , 19.00 â .
PHP ? - 20 2021, PHP of BY Meetup #36 , 19.00 â .
- 28 , , PHP Russia, 2021.
phpcommunity.ru.
- 18 , 3- PHP- , 19.00 â .
PHP Internals
[RFC] Namespaces in bundled PHP extensions
PHP! (, ..) .
.resource
PHP - . , PHP 8.1 :
IMAPConnection -> IMAP\Connection FTPConnection -> FTP\Connection LDAP -> LDAP\Connection LDAPResult -> LDAP\Result LDAPResultEntry -> LDAP\ResultEntry PgSql -> PgSql\Connection PgSqlResult -> PgSql\Result PgSqlLob -> PgSql\Lob
[RFC] Add return type declarations for internal methods
PHP 8.0 . . , .
, . , .
class SomeStandardClass { public function method(): int {} } class UserClass extends SomeStandardClass { public function method() {} } // Fatal error: Declaration of UserClass::method() must be compatible with SomeStandardClass::method()
. PHP 8.1 . ,Deprecation notice
. PHP 9Fatal error
.
class MyDateTime extends DateTime { public function modify(string $modifier) { return false; } } // Deprecated: Declaration of MyDateTime::modify(string $modifier) should be compatible with DateTime::modify(string $modifier): DateTime|false
[RFC] Property Accessors
.
. ,__get
__set
.C#
:
class Foo { public $prop { get { /* ... */ } set { /* ... */ } } }
readonly :
class User { public string $name { get; } public function __construct(string $name) { $this->name = $name; } }
, public/private :
class User { public string $name { get; private set; } ... }
:
class Foo { public int $bar { get { error_log('Getting $bar'); return $this->bar; } set { assert($bar > 42); $this->bar = $bar; } } }
lazy
guard
PHP 8.1.
[RFC] Pure intersection types
PHP 8.0 , RFC .
TypeA&TypeB
,instanceof TypeA
instanceof TypeB
.
class A { private Traversable&Countable $countableIterator; public function setIterator(Traversable&Countable $countableIterator): void { $this->countableIterator = $countableIterator; } public function getIterator(): Traversable&Countable { return $this->countableIterator; } }
pure intersection types, union . .
[RFC] Deprecate ticks
PHP :declare(ticks=1);
. pcntl.pcntl_signal()
pcntl_async_signals()
. PHP 8.1 PHP 9.
[RFC] Final class constants
final
, .
class Foo { final public const X = "foo"; } class Bar extends Foo { public const X = "bar"; } // Fatal error: Bar::X cannot override final constant Foo::X
RFC: .
- PHP:
- CLion php-src â - PHP 8.1.
- PHP Debian/Ubuntu â PHP.Watch.
- phpbench/phpbench 1.0.0 â . , â , CI .
Release Radar #10 . - ergebnis/factory-bot â Doctrine ORM.
- spatie/file-system-watcher â js- paulmillr/chokidar .
- vtsykun/packeton â packagist composer-, composer/satis , packagist.com .
- rybakit/phpunit-extras â expect*() PHPUnit, .
- infection 0.23.0 â , pestphp/pest.
- captainhookphp/captainhook â Git- PHP . , .
- readme.so â README-. ( PHP).
Symfony
- Symfony 5.3
- Symfony Messenger pcntl_alarm().
- PrestoPHP/PrestoPHP â Silex , .
- TransMaintain â Symfony .
- Symfony #750 (10-16 2021)
Laravel
- laravel-arcanist/arcanist â .
. - Wulfheart/pretty-routes â .
- cerbero90/lazy-json â JSON- illuminate/support (Laravel).
- mailcare/mailcare â mailinator.com, Laravel.
Form Request Laravel
Yii
- Yii 2021, 2 â Yii 3 Yii 2, , .
- Yii 3: yiisoft/profiler, yiisoft/error-handler, yiisoft/translator, yiisoft/yii-event, yiisoft/assets.
- . thephpleague/flysystem.
- PHP.
- PHP â Larry Garfield, lex111.
- , PHP â .
â CQRS ES PHP , â .
MessagePack.
PHP-SPX PHP.
/
PHP- .
PHPFest 2020.
Xdebug 3 Docker
PhpStorm Xdebug 3 Linux
PHP Internals News podcast #84 â - PHP 8.1: Ben Ramsey, Patrick Allaert.
- PHP - â Joe Watkins , PHP , .
Laravel JIT :
- 0xABADCAFE/php-demo-engine â PHP. ASCII- .
- remoteok.io index.php $101k .
5 Ű:
- PHP :
3v4l.org/WMfPP Alexander Lisachenko mostrou$b = new class { function __destruct() { $GLOBALS['b'] = 2; } }; $a = 1; $b = 1; var_dump($a + $b); // 3
mais magia negra no PHP RĂșssia 2019. E no PHP RĂșssia 2021 esperamos mais milagres do PHP dele .
Se vocĂȘ notar um erro ou imprecisĂŁo, informe-nos por meio de um habr ou telegrama pessoal .
Inscreva-se no canal PHP Digest Telegram .
Enviar link
Links de busca em todos os resumos
â NĂșmero anterior: PHP-Digest # 202