Merge ~utkarsh/ubuntu/+source/php-parser:merge-php-parser-jammy into ubuntu/+source/php-parser:debian/sid

Proposed by Utkarsh Gupta
Status: Merged
Merge reported by: Utkarsh Gupta
Merged at revision: 24e39398ce3cc47985edb50b1e1fb07428c23ed5
Proposed branch: ~utkarsh/ubuntu/+source/php-parser:merge-php-parser-jammy
Merge into: ubuntu/+source/php-parser:debian/sid
Diff against target: 206 lines (+160/-1)
5 files modified
debian/changelog (+28/-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
Chloé Smith (community) Approve
Christian Ehrhardt  Pending
Bryce Harrington Pending
Canonical Server packageset reviewers Pending
git-ubuntu import Pending
Review via email: mp+411593@code.launchpad.net

Description of the change

Merge of php-parser from Debian unstable to unblock php-codecoverage.

To post a comment you must log in.
Revision history for this message
Chloé Smith (kajiya) wrote :

lgtm!

review: Approve
Revision history for this message
Utkarsh Gupta (utkarsh) wrote :

Thank you! Uploaded to the archive! \o/

Only to find out that it has a missing dependency, php-codecoverage, which also has a missing dependency of php-codecoverage. Heh, funny. Turns out, we've hit another circular-dependency hellhole, albeit not so hell-y :P

I'll see what I can do to fix this. Meanwhile over to Bryce from here.

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

Indeed, the php-parser merge is needed to resolve this circular dependency. With this merge done it should hopefully be possible to bootstrap php-codecoverage. I'm going to test build locally and then work with vorlon on untangling things.

Thanks again for tackling the merge.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

 php-parser | 4.13.1-1ubuntu2 | jammy/universe | source, all

I think this could be set merged, for now I'm consuming the team review slot to remove it from our overview.

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

Subscribers

People subscribed via source and target branches