Merge ~bryce/ubuntu/+source/php-parser:merge-v4.13.2-1-jammy into ubuntu/+source/php-parser:debian/sid

Proposed by Bryce Harrington
Status: Merged
Merge reported by: Bryce Harrington
Merged at revision: e75a3801c573e6756ddcecaf066d93da397463f2
Proposed branch: ~bryce/ubuntu/+source/php-parser:merge-v4.13.2-1-jammy
Merge into: ubuntu/+source/php-parser:debian/sid
Diff against target: 234 lines (+181/-1)
5 files modified
debian/changelog (+49/-0)
debian/control (+2/-1)
debian/patches/0003-Disable-new-test-cases-not-yet-32-bit-compatible.patch (+57/-0)
debian/patches/0004-Disable-CodeParsingTest-due-to-integer-syntax.patch (+71/-0)
debian/patches/series (+2/-0)
Reviewer Review Type Date Requested Status
Utkarsh Gupta (community) Approve
Canonical Server Pending
Canonical Server packageset reviewers Pending
git-ubuntu import Pending
Review via email: mp+416359@code.launchpad.net

Description of the change

Merge with Debian's package. This simply pulls in a bugfix release from upstream, with the following changes:

Version 4.13.2 (2021-11-30)
---------------------------

### Added

* Added builders for enums and enum cases.

### Fixed

* NullsafeMethodCall now extends from CallLike.
* The `namespacedName` property populated by the `NameResolver` is now declared on relevant nodes,
  to avoid a dynamic property deprecation warning with PHP 8.2.

These sound more like refactoring than bugfixing, but the changes are discrete enough I think they'll be safe. I don't think this violates feature freeze but am filing this MP for a second opinion. The changes are not very important, so skipping this update is certainly a valid possibility here. OTOH, if this is acceptable there are some other random PHP packages with similarly modest merges I might try to pull in.

PPA: https://launchpad.net/~bryce/+archive/ubuntu/php-parser-merge-v4.13.2-1

Bileto:
* gnome-terminal
  - lp-test-ppa ppa:bryce/php-parser-merge-v4.13.2-1 --release jammy --showpass

Usual tags pushed for review:
  tags/old/debian 2456951
  tags/new/debian 6cb14a8
  tags/old/ubuntu 5b1b4e9
  tags/logical/4.13.1-1ubuntu2 c6c7b96
  tags/reconstruct/4.13.1-1ubuntu2 60b5e53
  tags/split/4.13.1-1ubuntu2 a7d1868

Code for this change has been pushed to this branch:
  merge-v4.13.2-1-jammy

To post a comment you must log in.
Revision history for this message
Utkarsh Gupta (utkarsh) wrote :

Go, go, go.

review: Approve
Revision history for this message
Bryce Harrington (bryce) wrote :

Thanks; uploaded

Vcs-Git: https://git.launchpad.net/~bryce/ubuntu/+source/php-parser
Vcs-Git-Commit: e75a3801c573e6756ddcecaf066d93da397463f2
Vcs-Git-Ref: refs/heads/merge-v4.13.2-1-jammy

$ dput ubuntu ../php-parser_4.13.2-1ubuntu1_source.changes
gpg: ../php-parser_4.13.2-1ubuntu1_source.changes: Valid signature from E603B2578FB8F0FB
gpg: ../php-parser_4.13.2-1ubuntu1.dsc: Valid signature from E603B2578FB8F0FB
D: Setting host argument.
Checking signature on .changes
Checking signature on .dsc
Uploading to ubuntu (via ftp to upload.ubuntu.com):
  Uploading php-parser_4.13.2-1ubuntu1.dsc: done.
  Uploading php-parser_4.13.2.orig.tar.xz: done.
  Uploading php-parser_4.13.2-1ubuntu1.debian.tar.xz: done.
  Uploading php-parser_4.13.2-1ubuntu1_source.buildinfo: done.
  Uploading php-parser_4.13.2-1ubuntu1_source.changes: done.
Successfully uploaded packages.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index 5c1a75a..9e80dcd 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,18 @@
6+php-parser (4.13.2-1ubuntu1) jammy; urgency=medium
7+
8+ * Merge with Debian unstable. Remaining changes:
9+ - d/p/0003-Disable-new-test-cases-not-yet-32-bit-compatible.patch:
10+
11+ + Disable two new test cases in order to fix proposed migration
12+ blockage on armhf due to autopkgtest failures. Upstream indicates
13+ these new test cases have not been verified to work with 32-bit.
14+ (LP #1878102)
15+ - d/p/0004-Disable-CodeParsingTest-due-to-integer-syntax.patch:
16+ + Disable another test case that is not yet 32-bit compatible, to fix
17+ proposed migration blockage on armhf.
18+
19+ -- Bryce Harrington <bryce@canonical.com> Thu, 03 Mar 2022 14:54:31 -0800
20+
21 php-parser (4.13.2-1) unstable; urgency=medium
22
23 [ Jaroslav Hanslík ]
24@@ -8,6 +23,26 @@ php-parser (4.13.2-1) unstable; urgency=medium
25
26 -- David Prévot <taffit@debian.org> Mon, 06 Dec 2021 09:49:28 -0400
27
28+php-parser (4.13.1-1ubuntu2) jammy; urgency=medium
29+
30+ * No-change rebuild against older phpunit to resolve dependency confusion.
31+
32+ -- Bryce Harrington <bryce@canonical.com> Fri, 19 Nov 2021 00:38:48 +0000
33+
34+php-parser (4.13.1-1ubuntu1) jammy; urgency=medium
35+
36+ * Merge with Debian unstable. Remaining changes:
37+ - d/p/0003-Disable-new-test-cases-not-yet-32-bit-compatible.patch:
38+ + Disable two new test cases in order to fix proposed migration
39+ blockage on armhf due to autopkgtest failures. Upstream indicates
40+ these new test cases have not been verified to work with
41+ 32-bit. (LP #1878102)
42+ - d/p/0004-Disable-CodeParsingTest-due-to-integer-syntax.patch:
43+ + Disable another test case that is not yet 32-bit compatible, to
44+ fix proposed migration blockage on armhf.
45+
46+ -- Utkarsh Gupta <utkarsh@debian.org> Tue, 09 Nov 2021 17:51:30 +0530
47+
48 php-parser (4.13.1-1) unstable; urgency=medium
49
50 [ Nikita Popov ]
51@@ -35,6 +70,20 @@ php-parser (4.13.0-1) unstable; urgency=medium
52
53 -- David Prévot <taffit@debian.org> Thu, 07 Oct 2021 14:17:02 -0400
54
55+php-parser (4.10.4-1ubuntu1) hirsute; urgency=medium
56+
57+ * Merge with Debian unstable. Remaining changes:
58+ - d/p/0003-Disable-new-test-cases-not-yet-32-bit-compatible.patch:
59+ + Disable two new test cases in order to fix proposed migration
60+ blockage on armhf due to autopkgtest failures. Upstream indicates
61+ these new test cases have not been verified to work with 32-bit.
62+ (LP #1878102)
63+ - d/p/0004-Disable-CodeParsingTest-due-to-integer-syntax.patch:
64+ + Disable another test case that is not yet 32-bit compatible, to fix
65+ proposed migration blockage on armhf.
66+
67+ -- Bryce Harrington <bryce@canonical.com> Thu, 21 Jan 2021 13:39:03 -0800
68+
69 php-parser (4.10.4-1) unstable; urgency=medium
70
71 [ Nikita Popov ]
72diff --git a/debian/control b/debian/control
73index 2e9c63d..9d06b17 100644
74--- a/debian/control
75+++ b/debian/control
76@@ -1,7 +1,8 @@
77 Source: php-parser
78 Section: php
79 Priority: optional
80-Maintainer: Debian PHP PEAR Maintainers <pkg-php-pear@lists.alioth.debian.org>
81+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
82+XSBC-Original-Maintainer: Debian PHP PEAR Maintainers <pkg-php-pear@lists.alioth.debian.org>
83 Uploaders: David Prévot <taffit@debian.org>,
84 Prach Pongpanich <prachpub@gmail.com>
85 Build-Depends: debhelper-compat (= 13),
86diff --git a/debian/patches/0003-Disable-new-test-cases-not-yet-32-bit-compatible.patch b/debian/patches/0003-Disable-new-test-cases-not-yet-32-bit-compatible.patch
87new file mode 100644
88index 0000000..759c633
89--- /dev/null
90+++ b/debian/patches/0003-Disable-new-test-cases-not-yet-32-bit-compatible.patch
91@@ -0,0 +1,57 @@
92+From d8a2b2392cc65b493e375987cb593a4f641e7b64 Mon Sep 17 00:00:00 2001
93+From: Bryce Harrington <bryce@bryceharrington.org>
94+Date: Tue, 12 May 2020 20:37:14 +0000
95+Subject: [PATCH] Disable new test cases not yet 32-bit compatible
96+
97+Two test cases new in 4.4.0 fail on armhf:
98+
99+ - CodeParsingTest::testParse: Different integer syntaxes
100+ - Lexer\EmulativeTest::testLexNewFeatures: '0xCAFE_F00D'
101+
102+Upstream reports these may not be 32-bit compatible.
103+
104+For now, don't run these two new test cases, until they're expected to be
105+able to run on all platforms.
106+
107+Signed-off-by: Bryce Harrington <bryce@bryceharrington.org>
108+---
109+ test/PhpParser/Lexer/EmulativeTest.php | 12 ------------
110+ 1 file changed, 12 deletions(-)
111+
112+Origin: vendor
113+Bug: https://github.com/nikic/PHP-Parser/issues/662
114+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/php-parser/+bug/1878102
115+Last-Updated: 2020-12-18
116+
117+diff --git a/test/PhpParser/Lexer/EmulativeTest.php b/test/PhpParser/Lexer/EmulativeTest.php
118+index e141b13..9b74fd1 100644
119+--- a/test/PhpParser/Lexer/EmulativeTest.php
120++++ b/test/PhpParser/Lexer/EmulativeTest.php
121+@@ -105,15 +105,6 @@ class EmulativeTest extends LexerTest
122+ $this->assertSame($expectedTokens, $tokens);
123+ }
124+
125+- /**
126+- * @dataProvider provideTestLexNewFeatures
127+- */
128+- public function testLexNewFeatures($code, array $expectedTokens) {
129+- $lexer = $this->getLexer();
130+- $lexer->startLexing('<?php ' . $code);
131+- $this->assertSameTokens($expectedTokens, $lexer);
132+- }
133+-
134+ /**
135+ * @dataProvider provideTestLexNewFeatures
136+ */
137+@@ -241,9 +232,6 @@ class EmulativeTest extends LexerTest
138+ ['1_000', [
139+ [Tokens::T_LNUMBER, '1_000'],
140+ ]],
141+- ['0xCAFE_F00D', [
142+- [Tokens::T_LNUMBER, '0xCAFE_F00D'],
143+- ]],
144+ ['0b0101_1111', [
145+ [Tokens::T_LNUMBER, '0b0101_1111'],
146+ ]],
147+--
148+2.25.1
149diff --git a/debian/patches/0004-Disable-CodeParsingTest-due-to-integer-syntax.patch b/debian/patches/0004-Disable-CodeParsingTest-due-to-integer-syntax.patch
150new file mode 100644
151index 0000000..de04972
152--- /dev/null
153+++ b/debian/patches/0004-Disable-CodeParsingTest-due-to-integer-syntax.patch
154@@ -0,0 +1,71 @@
155+From a354b3bc4fcf1bfe22d84741ebd1d945c4fa50df Mon Sep 17 00:00:00 2001
156+From: Bryce Harrington <bryce@bryceharrington.org>
157+Date: Thu, 14 May 2020 23:11:18 +0000
158+Subject: [PATCH] Disable CodeParsingTest due to integer syntax inconsistency
159+ on armhf
160+
161+Workaround testsuite failure when run on armhf by disabling the test
162+case. The specific failing test case is from
163+PhpParser\CodeParsingTest::testParse with the
164+scalar/numberSeparators.test#0 data set:
165+
166+ 2: Stmt_Expression(
167+ - expr: Scalar_LNumber(
168+ - value: 3405705229
169+ + expr: Scalar_DNumber(
170+ + value: 0
171+ )
172+
173+Signed-off-by: Bryce Harrington <bryce@bryceharrington.org>
174+---
175+ test/PhpParser/CodeParsingTest.php | 29 -----------------------------
176+ 1 file changed, 29 deletions(-)
177+
178+Origin: vendor
179+Bug: https://github.com/nikic/PHP-Parser/issues/662
180+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/php-parser/+bug/1878102
181+Last-Updated: 2020-12-18
182+
183+diff --git a/test/PhpParser/CodeParsingTest.php b/test/PhpParser/CodeParsingTest.php
184+index 24e93dd..1947932 100644
185+--- a/test/PhpParser/CodeParsingTest.php
186++++ b/test/PhpParser/CodeParsingTest.php
187+@@ -7,35 +7,6 @@ use PhpParser\Node\Stmt;
188+
189+ class CodeParsingTest extends CodeTestAbstract
190+ {
191+- /**
192+- * @dataProvider provideTestParse
193+- */
194+- public function testParse($name, $code, $expected, $modeLine) {
195+- if (null !== $modeLine) {
196+- $modes = array_fill_keys(explode(',', $modeLine), true);
197+- } else {
198+- $modes = [];
199+- }
200+-
201+- list($parser5, $parser7) = $this->createParsers($modes);
202+- list($stmts5, $output5) = $this->getParseOutput($parser5, $code, $modes);
203+- list($stmts7, $output7) = $this->getParseOutput($parser7, $code, $modes);
204+-
205+- if (isset($modes['php5'])) {
206+- $this->assertSame($expected, $output5, $name);
207+- $this->assertNotSame($expected, $output7, $name);
208+- } elseif (isset($modes['php7'])) {
209+- $this->assertNotSame($expected, $output5, $name);
210+- $this->assertSame($expected, $output7, $name);
211+- } else {
212+- $this->assertSame($expected, $output5, $name);
213+- $this->assertSame($expected, $output7, $name);
214+- }
215+-
216+- $this->checkAttributes($stmts5);
217+- $this->checkAttributes($stmts7);
218+- }
219+-
220+ public function createParsers(array $modes) {
221+ $lexer = new Lexer\Emulative(['usedAttributes' => [
222+ 'startLine', 'endLine',
223+--
224+2.25.1
225+
226diff --git a/debian/patches/series b/debian/patches/series
227index 629876c..5ce80e0 100644
228--- a/debian/patches/series
229+++ b/debian/patches/series
230@@ -1,2 +1,4 @@
231 0001-Allow-require-to-search-in-the-path.patch
232 0002-Adapt-shebang-for-PHP-script.patch
233+0003-Disable-new-test-cases-not-yet-32-bit-compatible.patch
234+0004-Disable-CodeParsingTest-due-to-integer-syntax.patch

Subscribers

People subscribed via source and target branches