PHP Digest # 186 (del 3 al 17 de agosto de 2020)



Nueva selección con enlaces a noticias y materiales. En: PHP 8 Beta 1, nuevamente sobre la sintaxis de atributos en PHP 8: #[Attr]vs @[Attr], sugerencia de sintaxis para BigInt, revisiones de PHP 8 y ​​muchos más videos, herramientas, transmisiones, podcasts.



ÂĄDisfruta leyendo!





Noticias y comunicados



  • PHP 8.0.0 Beta 1 — - , 8.0 . ( ). 20 .
  • PHP 7.4.9, 7.3.21, 7.2.33 — phar.
  • WordPress 5.5 “Eckstine” — - , CMS .


PHP Internals



  • [RFC] Shorter Attribute Syntax Change — PHP 8 . , - , 2- .



    Tycon Andre , #[Attr] PHP 7. C , , ?



    @@Attr, #[Attr], <<Attr>> @[Attr]:
    @@ORM\Entity
    @@ORM\Table("user")
    class User
    {
        @@ORM\Id @@ORM\Column("integer") @@ORM\GeneratedValue
        private $id;
    
        @@ORM\Column("string", ORM\Column::UNIQUE)
        @@Assert\Email(["message" => "The email '{{ value }}' is not a valid email."])
        private $email;
    }
    
    #[
      ORM\Entity,
      ORM\Table("user")
    ]
    class User
    {
        #[ORM\Id, ORM\Column("integer"), ORM\GeneratedValue]
        private $id;
    
        #[ORM\Column("string", ORM\Column::UNIQUE)]
        #[Assert\Email(["message" => "The email '{{ value }}' is not a valid email."])]
        private $email;
    }
    
    @[
      ORM\Entity,
      ORM\Table("user")
    ]
    class User
    {
        @[ORM\Id, ORM\Column("integer"), ORM\GeneratedValue]
        private $id;
    
        @[ORM\Column("string", ORM\Column::UNIQUE)]
        @[Assert\Email(["message" => "The email '{{ value }}' is not a valid email."])]
        private $email;
    }
    
    <<
      ORM\Entity,
      ORM\Table("user")
    >>
    class User
    {
        <<ORM\Id, ORM\Column("integer"), ORM\GeneratedValue>>
        private $id;
    
        <<ORM\Column("string", ORM\Column::UNIQUE)>>
        <<Assert\Email(["message" => "The email '{{ value }}' is not a valid email."])>>
        private $email;
    }
    
    @:ORM\Entity
    @:ORM\Table("user")
    class User
    {
        @:ORM\Id @:ORM\Column("integer") @:ORM\GeneratedValue
        private $id;
    
        @:ORM\Column("string", ORM\Column::UNIQUE)
        @:Assert\Email(["message" => "The email '{{ value }}' is not a valid email."])
        private $email;
    }
    
  • [RFC] Named Parameters explicit opt in — , .
    //    
    function callBar(Foo $:parameterName) {
        $internalName->bar();
    }
    
    $x = new Foo();
    callBar(parameterName: $x);
    
    //   
    function callBar($externalName) {
        $externalName->bar();
    }
    
    $x = new Foo();
    callBar(externalName: $x); // Error: cannot call function callBar() using parameter $externalName by name.
    
    PHP 8 , 8.1, .
  • [Proposal] Bigint shorthand (123n) for GMP objects — RFC.



    PHP JavaScript «n»:
    $theBiggestInt = 9007199254740991n


    GMP. GMP , , .
  • PHP (php -a), PR, . bobthecow/psysh.
  • cruzar [RFC] PHP Namespace Policy — .




  • PHPUnit 9.3 — C PHP 8 Xdebug 3.
  • sebastianbergmann/cli-parser — , PHPUnit.
  • coduo/php-matcher — , .
  • phpfn/phpfn — SerafimArts.
  • hidehalo/nanoid-php — PHP- Nanoid — URL- .
  • woohoolabs/zen — PSR-11- .
  • loophp/collection — .


Symfony



  • mrsuh/json-validation-bundle — JSON / json-schema.org.
  • Symfony- AWS Lambda
  • habr SSR: ReactJS PHP.


Laravel



  • Laravel: .
  • vĂ­deo Laravel.
  • vĂ­deo Better Laravel Way — .
  • habr Laravel- (10–16 2020)




  • PHP Codeception.
  • PHP-.
  • PHP.
  • Method fossilisation — .
  • PHP- .
  • KPHPStorm — 7 KPHP. C .



    , KPHP , PhpStorm, .



    github.com/unserialize/kphpstorm.
  • PHP — - RFC , .
  • habr Highload PHP: .
  • habr PHP 8: «» «» ( PHP 7.4)
  • habr html- php , .
  • habr php 8 JIT Docker 5


/



  • vĂ­deo PHP 8: Process & fixing insanity — PHP 8 core- George Peter Banyard. , William Pinaud.
  • vĂ­deo Type Juggling Magic: Why PHP thinks 0 and «password» are the same — , PHP .
  • vĂ­deo Dutch PHP Conf 2020
  • vĂ­deoru « PHP GO» PHP Go .
  • audioru PHP #82: declare(strict_types=1).
  • audioru PHP #83: ?
  • audio Voices of the ElePHPant: — - PHP 8 Sara Golemon Garbriel Caruso — .
  • audio PHP Internals News #66 — PHP 8 PHP .
  • audio PHP Internals News #65 — Dan Ackroyd ?-> PHP 8.




  • www.elephpant.com - Los elefantes azules y rosados ​​originales se pueden pedir por correo electrĂłnico al diseñador Vincent Pontier .



    Los grises y negros también estån disponibles en Symfony shop.symfony.com , que ahora se envía a todo el mundo.






ÂĄGracias por su atenciĂłn!



Si nota un error o inexactitud, hĂĄganoslo saber personalmente .

Preguntas y sugerencias escrĂ­banos a mail o twitter .



MĂĄs noticias y comentarios en el canal PHP Digest Telegram .



Enviar enlace

Buscar enlaces en todos los resĂșmenes

← NĂșmero anterior: PHP-Digest № 185




All Articles