Skip to content

Commit 3966e79

Browse files
committed
Merge branch 'sw-27063/fix-composer-installation-php82' into '5.7'
SW-27063 - Ensure right version of laminas-code is installed See merge request shopware/5/product/shopware!1001
2 parents 670a492 + 6f09777 commit 3966e79

File tree

3 files changed

+73
-53
lines changed

3 files changed

+73
-53
lines changed

.gitlab-ci.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,6 @@ PHP 8.1:
177177
PHP 8.2:
178178
extends: .phpunit_base
179179
image: gitlab.shopware.com:5005/shopware/5/product/image/continuous:8.2
180-
script:
181-
- composer update laminas/laminas-code
182-
- make test-phpunit
183180

184181
MySQL 8.0:
185182
extends: .phpunit_base
@@ -233,7 +230,6 @@ Elasticsearch 7:
233230
script:
234231
- apk add --no-cache sudo
235232
- export SW_HOST=$(hostname -i)
236-
- composer update laminas/laminas-code
237233
- make init
238234
- make prepare-mink
239235
- chown -R www-data:www-data .

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ debug-config-test: .make.config.build.debug
130130
touch $@
131131

132132
.make.install.composer-dependencies:
133+
composer update laminas/laminas-code
133134
composer install
134135
composer install -d recovery/common
135136
composer bin all install

build/build.xml

Lines changed: 72 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -19,49 +19,49 @@
1919
</target>
2020

2121
<target name="build-continuous" depends="unit-shopware-continuous"/>
22-
<target name="build-unit" depends="build-composer-install, build-cache-dir, build-database, build-snippets-deploy, build-theme-initialize,build-create-admin-account, build-install-lock-file, build-disable-firstrunwizard, install-git-hooks" />
22+
<target name="build-unit" depends="build-composer-install, build-cache-dir, build-database, build-snippets-deploy, build-theme-initialize,build-create-admin-account, build-install-lock-file, build-disable-firstrunwizard, install-git-hooks"/>
2323
<target name="test-unit" depends="unit-shopware"/>
2424

2525
<target name="write-properties" description="Write build-variables to file">
2626
<propertyfile file="${build.dir}/build.properties" comment="Project properties">
27-
<entry key="db.host" value="${db.host}"/>
28-
<entry key="db.name" value="${db.name}"/>
29-
<entry key="db.user" value="${db.user}"/>
30-
<entry key="db.password" value="${db.password}"/>
31-
<entry key="db.port" value="${db.port}"/>
32-
<entry key="app.path" value="${app.path}"/>
33-
<entry key="app.host" value="${app.host}"/>
27+
<entry key="db.host" value="${db.host}"/>
28+
<entry key="db.name" value="${db.name}"/>
29+
<entry key="db.user" value="${db.user}"/>
30+
<entry key="db.password" value="${db.password}"/>
31+
<entry key="db.port" value="${db.port}"/>
32+
<entry key="app.path" value="${app.path}"/>
33+
<entry key="app.host" value="${app.host}"/>
3434
</propertyfile>
3535
</target>
3636

3737
<target name="configure" description="Set up build-variables">
3838
<input message="Please enter db-host:"
3939
addproperty="user.db.host"
40-
defaultvalue="${db.host}" />
40+
defaultvalue="${db.host}"/>
4141

4242
<input message="Please enter db-port:"
4343
addproperty="user.db.port"
44-
defaultvalue="${db.port}" />
44+
defaultvalue="${db.port}"/>
4545

4646
<input message="Please enter db-name:"
4747
addproperty="user.db.name"
48-
defaultvalue="${db.name}" />
48+
defaultvalue="${db.name}"/>
4949

5050
<input message="Please enter db-username:"
5151
addproperty="user.db.user"
52-
defaultvalue="${db.user}" />
52+
defaultvalue="${db.user}"/>
5353

5454
<input message="Please enter db-password:"
5555
addproperty="user.db.password">
5656
</input>
5757

5858
<input message="Please enter app.host (Hostname e.g. example.com):"
5959
addproperty="user.app.host"
60-
defaultvalue="${app.host}" />
60+
defaultvalue="${app.host}"/>
6161

6262
<input message="Please enter app.path (e.g. /shopware. Leave blank if installed in document root):"
6363
addproperty="user.app.path"
64-
defaultvalue="${app.path}" />
64+
defaultvalue="${app.path}"/>
6565

6666
<antcall target="write-properties">
6767
<param name="db.host" value="${user.db.host}"/>
@@ -79,10 +79,10 @@
7979
<available file="${basedir}/composer.phar" property="composer.binary.present"/>
8080
</target>
8181

82-
<target name="install-composer-binary" depends="check-composer-binary" unless="composer.binary.present">
82+
<target name="install-composer-binary" depends="check-composer-binary" unless="composer.binary.present">
8383
<exec executable="bash" failonerror="true">
84-
<arg value="-c" />
85-
<arg value="curl -s https://getcomposer.org/installer | ${script.php}" />
84+
<arg value="-c"/>
85+
<arg value="curl -s https://getcomposer.org/installer | ${script.php}"/>
8686
</exec>
8787
</target>
8888

@@ -97,34 +97,40 @@
9797

9898
<target name="build-composer-install" depends="update-composer-binary">
9999
<exec executable="${script.php}" failonerror="true">
100-
<arg value="composer.phar" />
101-
<arg value="install" />
102-
<arg value="--no-interaction" />
103-
<arg value="--optimize-autoloader" />
104-
<arg value="--no-suggest" />
100+
<arg value="composer.phar"/>
101+
<arg value="update"/>
102+
<arg value="laminas/laminas-code"/>
103+
</exec>
104+
105+
<exec executable="${script.php}" failonerror="true">
106+
<arg value="composer.phar"/>
107+
<arg value="install"/>
108+
<arg value="--no-interaction"/>
109+
<arg value="--optimize-autoloader"/>
110+
<arg value="--no-suggest"/>
105111
</exec>
106112
</target>
107113

108114
<target name="build-composer-update" depends="update-composer-binary">
109115
<exec executable="${script.php}" failonerror="true">
110-
<arg value="composer.phar" />
111-
<arg value="update" />
112-
<arg value="--no-interaction" />
116+
<arg value="composer.phar"/>
117+
<arg value="update"/>
118+
<arg value="--no-interaction"/>
113119
</exec>
114120
</target>
115121

116122
<target name="check-code-style" depends="build-composer-install">
117123
<exec executable="${script.php}" failonerror="true">
118-
<arg value="vendor/bin/php-cs-fixer" />
119-
<arg value="fix" />
120-
<arg value="--dry-run" />
121-
<arg value="--stop-on-violation" />
122-
<arg value="--verbose" />
123-
<arg value="--show-progress=dots" />
124+
<arg value="vendor/bin/php-cs-fixer"/>
125+
<arg value="fix"/>
126+
<arg value="--dry-run"/>
127+
<arg value="--stop-on-violation"/>
128+
<arg value="--verbose"/>
129+
<arg value="--show-progress=dots"/>
124130
</exec>
125131
</target>
126132

127-
<target name="build-database" depends="build-database-foundation, build-database-deploy-demodata" />
133+
<target name="build-database" depends="build-database-foundation, build-database-deploy-demodata"/>
128134

129135
<target name="build-create-admin-account">
130136
<exec executable="${script.php}" dir="${basedir}/bin" failonerror="true">
@@ -192,7 +198,7 @@
192198

193199
<target name="build-install-lock-file">
194200
<tstamp>
195-
<format property="installDate" pattern="yyyyMMddHHmm" />
201+
<format property="installDate" pattern="yyyyMMddHHmm"/>
196202
</tstamp>
197203

198204
<echo file="${basedir}/recovery/install/data/install.lock">${installDate}</echo>
@@ -237,8 +243,8 @@
237243

238244
<target name="unit-continuous-es">
239245
<exec executable="${script.phpunit}" failonerror="true" dir="${test.dir.shopware}">
240-
<arg value="--exclude-group=skipElasticSearch" />
241-
<arg value="--group=elasticSearch" />
246+
<arg value="--exclude-group=skipElasticSearch"/>
247+
<arg value="--group=elasticSearch"/>
242248
<arg value="--log-junit=${log.dir}/junit.xml"/>
243249
</exec>
244250
</target>
@@ -258,7 +264,7 @@
258264
</target>
259265

260266
<target name="stop-server">
261-
<exec executable="${script.server.stop}" />
267+
<exec executable="${script.server.stop}"/>
262268
</target>
263269

264270
<target name="mink-shopware-continuous-responsive">
@@ -284,8 +290,8 @@
284290

285291
<target name="static-lint" description="Perform syntax check of sourcecode files">
286292
<exec executable="bash" failonerror="true">
287-
<arg value="-c" />
288-
<arg value="find -L ${basedir}/engine/Shopware/ -name '*.php' -print0 | xargs -0 -n 1 -P 4 php -l" />
293+
<arg value="-c"/>
294+
<arg value="find -L ${basedir}/engine/Shopware/ -name '*.php' -print0 | xargs -0 -n 1 -P 4 php -l"/>
289295
</exec>
290296
</target>
291297

@@ -294,8 +300,8 @@
294300
<arg value="--standard=${build.dir}"/>
295301
<arg value="--report=checkstyle"/>
296302
<arg value="--report-file=${log.dir}/checkstyle.xml"/>
297-
<arg value="--extensions=php" />
298-
<arg value="-n" />
303+
<arg value="--extensions=php"/>
304+
<arg value="-n"/>
299305
<arg value="${app.dir}/"/>
300306
</exec>
301307
</target>
@@ -311,15 +317,23 @@
311317
</target>
312318

313319
<target name="static-phpcpd" description="PHP Copy/Paste Detector">
314-
<exec executable="${script.phpcpd}" failonerror="false" output="/dev/null" error="${log.dir}/error.log" append="true">
320+
<exec executable="${script.phpcpd}"
321+
failonerror="false"
322+
output="/dev/null"
323+
error="${log.dir}/error.log"
324+
append="true">
315325
<arg value="--log-pmd"/>
316326
<arg value="${log.dir}/cpd.xml"/>
317327
<arg value="${app.dir}/"/>
318328
</exec>
319329
</target>
320330

321331
<target name="static-phploc" description="PHP Lines of Code">
322-
<exec executable="${script.phploc}" failonerror="false" output="${log.dir}/loc.txt" error="${log.dir}/error.log" append="true">
332+
<exec executable="${script.phploc}"
333+
failonerror="false"
334+
output="${log.dir}/loc.txt"
335+
error="${log.dir}/error.log"
336+
append="true">
323337
<arg value="--log-xml"/>
324338
<arg value="${log.dir}/loc.xml"/>
325339
<arg value="--log-csv"/>
@@ -331,7 +345,12 @@
331345

332346
<target name="static-pdepend">
333347
<mkdir dir="${log.dir}/depend"/>
334-
<exec executable="${script.pdepend}" failonerror="false" output="${log.dir}/depend/output.txt" error="${log.dir}/error.log" append="true" dir="${app.dir}">
348+
<exec executable="${script.pdepend}"
349+
failonerror="false"
350+
output="${log.dir}/depend/output.txt"
351+
error="${log.dir}/error.log"
352+
append="true"
353+
dir="${app.dir}">
335354
<arg value="--summary-xml=${log.dir}/depend/summary.xml"/>
336355
<arg value="--jdepend-chart=${log.dir}/depend/jdepend.svg"/>
337356
<arg value="--overview-pyramid=${log.dir}/depend/pyramid.svg"/>
@@ -340,7 +359,11 @@
340359
</target>
341360

342361
<target name="build-phpcb" description="Build CodeBrowser">
343-
<exec executable="${script.phpcb}" failonerror="false" output="/dev/null" error="${log.dir}/error.log" append="true">
362+
<exec executable="${script.phpcb}"
363+
failonerror="false"
364+
output="/dev/null"
365+
error="${log.dir}/error.log"
366+
append="true">
344367
<arg value="-l${log.dir}"/>
345368
<arg value="-o${log.dir}/code-browser"/>
346369
<arg value="-s${app.dir}"/>
@@ -373,11 +396,11 @@
373396
<target name="compile-tinymce" description="Builds a TinyMce package with default used plugins">
374397
<!-- Combine all files -->
375398
<concat destfile="${basedir}/engine/Library/TinyMce/tiny_mce_full.js">
376-
<fileset dir="${basedir}/engine/Library/TinyMce/" includes="tiny_mce.js" />
377-
<fileset dir="${basedir}/engine/Library/TinyMce/" includes="themes/advanced/langs/en.js" />
378-
<fileset dir="${basedir}/engine/Library/TinyMce/" includes="themes/advanced/langs/de.js" />
379-
<fileset dir="${basedir}/engine/Library/TinyMce/" includes="plugins/media_selection/editor_plugin.js" />
380-
<fileset dir="${basedir}/engine/Library/TinyMce/" includes="plugins/fullscreen/editor_plugin.js" />
399+
<fileset dir="${basedir}/engine/Library/TinyMce/" includes="tiny_mce.js"/>
400+
<fileset dir="${basedir}/engine/Library/TinyMce/" includes="themes/advanced/langs/en.js"/>
401+
<fileset dir="${basedir}/engine/Library/TinyMce/" includes="themes/advanced/langs/de.js"/>
402+
<fileset dir="${basedir}/engine/Library/TinyMce/" includes="plugins/media_selection/editor_plugin.js"/>
403+
<fileset dir="${basedir}/engine/Library/TinyMce/" includes="plugins/fullscreen/editor_plugin.js"/>
381404
</concat>
382405
</target>
383406
</project>

0 commit comments

Comments
 (0)