From 801be933318b4680f203c7ce7c76893fbad11f1e Mon Sep 17 00:00:00 2001 From: lacatoire Date: Sun, 10 May 2026 22:24:41 +0200 Subject: [PATCH 1/2] Sync EN: language/attributes.xml (WASM annotations + ajustes de exemplo) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Adiciona annotations="interactive" ao e annotations="non-interactive" aos que não devem ser interativos - Move output do exemplo "Lendo Atributos Usando a API Reflection" do comentário de bloco para um dedicado - Adiciona definição de MyAttribute/Thing ao exemplo "Lendo Atributos Específicos" para que ele seja autossuficiente php/doc-en@50e6f42c83 --- language/attributes.xml | 33 +++++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/language/attributes.xml b/language/attributes.xml index e9ed3b1dd..78b8783d8 100644 --- a/language/attributes.xml +++ b/language/attributes.xml @@ -1,6 +1,6 @@ - - + + Atributos Visão geral dos atributos @@ -30,7 +30,7 @@ Implementando métodos opcionais de uma interface com Atributos - + Sintaxe de Atributo - + + + &example.outputs; + + @@ -232,10 +236,8 @@ object(MyAttribute)#3 (1) { ["value"]=> int(1234) } -*/ - ]]> - + @@ -250,6 +252,21 @@ object(MyAttribute)#3 (1) { value = $value; + } +} + +#[MyAttribute(value: 1234)] +class Thing +{ +} function dumpMyAttributeData($reflection) { $attributes = $reflection->getAttributes(MyAttribute::class); From 690b21e01cb24e1c1092d846602708f156b464ae Mon Sep 17 00:00:00 2001 From: lacatoire Date: Sun, 10 May 2026 22:36:14 +0200 Subject: [PATCH 2/2] Adiciona annotations="non-interactive" aos 3 programlistings restantes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cobre os exemplos "Classe de Atributo Simples", "Usando a especificação de destino" e "Usando IS_REPEATABLE", para alinhar completamente com php/doc-en@50e6f42c83. --- language/attributes.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/language/attributes.xml b/language/attributes.xml index 78b8783d8..49a0e9dd7 100644 --- a/language/attributes.xml +++ b/language/attributes.xml @@ -297,7 +297,7 @@ dumpMyAttributeData(new ReflectionClass(Thing::class)); Classe de Atributo Simples - + Usando a especificação de destino para restringir onde os atributos podem ser usados - + Usando IS_REPEATABLE para permitir o atributo em uma declaração várias vezes - +