Skip to content

Commit f2797fb

Browse files
committed
Merged remote-tracking branch 'upstream/master'
2 parents c25e9f4 + 5ffcb73 commit f2797fb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+537
-414
lines changed

.docker/php53/Dockerfile

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
FROM buildpack-deps:jessie
2+
3+
ENV PHP_VERSION 5.3.29
4+
5+
# php 5.3 needs older autoconf
6+
RUN set -eux; \
7+
\
8+
apt-get update; \
9+
apt-get install -y \
10+
curl \
11+
autoconf2.13 \
12+
; \
13+
rm -r /var/lib/apt/lists/*; \
14+
\
15+
curl -sSLfO http://launchpadlibrarian.net/140087283/libbison-dev_2.7.1.dfsg-1_amd64.deb; \
16+
curl -sSLfO http://launchpadlibrarian.net/140087282/bison_2.7.1.dfsg-1_amd64.deb; \
17+
dpkg -i libbison-dev_2.7.1.dfsg-1_amd64.deb; \
18+
dpkg -i bison_2.7.1.dfsg-1_amd64.deb; \
19+
rm *.deb; \
20+
\
21+
curl -sSLf "https://php.net/get/php-$PHP_VERSION.tar.bz2/from/this/mirror" -o php.tar.bz2; \
22+
echo 'c4e1cf6972b2a9c7f2777a18497d83bf713cdbecabb65d3ff62ba441aebb0091 php.tar.bz2' | sha256sum -cw --status; \
23+
\
24+
mkdir -p /usr/src/php; \
25+
tar -xf php.tar.bz2 -C /usr/src/php --strip-components=1; \
26+
rm php.tar.bz2*; \
27+
\
28+
cd /usr/src/php; \
29+
./buildconf --force; \
30+
./configure --disable-cgi \
31+
$(command -v apxs2 > /dev/null 2>&1 && echo '--with-apxs2' || true) \
32+
--with-pdo-mysql \
33+
--with-zlib \
34+
--enable-mbstring \
35+
; \
36+
make -j"$(nproc)"; \
37+
make install; \
38+
\
39+
dpkg -r \
40+
bison \
41+
libbison-dev \
42+
; \
43+
apt-get purge -y --auto-remove \
44+
autoconf2.13 \
45+
; \
46+
rm -r /usr/src/php
47+
48+
CMD ["php", "-a"]

.docker/php54/Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
FROM php:5.4-cli
2+
3+
RUN docker-php-ext-install pdo
4+
RUN docker-php-ext-install pdo_mysql
5+
RUN docker-php-ext-install mbstring

.docker/php55_71/Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
ARG PHP_TAG
2+
FROM php:${PHP_TAG}
3+
4+
RUN docker-php-ext-install pdo
5+
RUN docker-php-ext-install pdo_mysql
6+
RUN docker-php-ext-install mbstring

.docker/php72_73/Dockerfile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
ARG PHP_VERSION
2+
FROM php:${PHP_VERSION}-cli
3+
4+
RUN docker-php-ext-install pdo
5+
RUN docker-php-ext-install pdo_mysql
6+
RUN docker-php-ext-install mbstring
7+
8+
# For consistent mime type file guesser
9+
RUN set -eux; \
10+
distFilePath=`which file`; \
11+
\
12+
mv ${distFilePath} ${distFilePath}.dist; \
13+
{ \
14+
echo '#! /bin/sh -eu'; \
15+
echo ''; \
16+
echo "${distFilePath}"'.dist "$@" | sed -e s,application/x-pie-executable,application/x-executable,g'; \
17+
} | tee ${distFilePath}; \
18+
\
19+
chmod +x ${distFilePath}; \
20+
\
21+
file /bin/ls --mime | grep application/x-executable; \
22+
:;

.github/workflows/continuous-integration.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ name: "Continuous Integration"
22

33
on:
44
pull_request:
5+
branches:
6+
- master
57
paths:
68
- .github/workflows/continuous-integration.yml
79
- composer.*

lib/Doctrine/Collection.php

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,39 @@ public function __serialize()
188188
return $vars;
189189
}
190190

191+
/**
192+
* Unserializes a Doctrine_Collection instance for php 7.4+
193+
*
194+
* @param string $serialized A serialized Doctrine_Collection instance
195+
*/
196+
public function __unserialize($data)
197+
{
198+
$array = unserialize($serialized);
199+
200+
$this->__unserialize($array);
201+
}
202+
203+
/**
204+
* Serializes the current instance for php 7.4+
205+
*
206+
* @return array
207+
*/
208+
public function __serialize() {
209+
210+
$vars = get_object_vars($this);
211+
212+
unset($vars['reference']);
213+
unset($vars['referenceField']);
214+
unset($vars['relation']);
215+
unset($vars['expandable']);
216+
unset($vars['expanded']);
217+
unset($vars['generator']);
218+
219+
$vars['_table'] = $vars['_table']->getComponentName();
220+
221+
return $vars;
222+
}
223+
191224
/**
192225
* Unserializes a Doctrine_Collection instance for php 7.4+
193226
*

lib/Doctrine/Connection.php

Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@
5252
* @version $Revision$
5353
* @author Konsta Vesterinen <[email protected]>
5454
* @author Lukas Smith <[email protected]> (MDB2 library)
55+
*
56+
* @property Doctrine_Export $export
5557
*/
5658
abstract class Doctrine_Connection extends Doctrine_Configurable implements Countable, IteratorAggregate, Serializable
5759
{
@@ -241,41 +243,31 @@ public function isConnected()
241243
}
242244

243245
/**
244-
* getOptions
245-
*
246246
* Get array of all options
247247
*
248-
* @return void
248+
* @return array<string, mixed>
249249
*/
250-
public function getOptions()
250+
public function getOptions(): array
251251
{
252252
return $this->options;
253253
}
254254

255255
/**
256-
* getOption
257-
*
258-
* Retrieves option
259-
*
260-
* @param string $option
261-
* @return void
256+
* @return null|mixed
262257
*/
263-
public function getOption($option)
258+
public function getOption(string $option)
264259
{
265260
if (isset($this->options[$option])) {
266261
return $this->options[$option];
267262
}
268263
}
269264

270265
/**
271-
* setOption
272-
*
273266
* Set option value
274267
*
275-
* @param string $option
276-
* @return void
268+
* @return mixed
277269
*/
278-
public function setOption($option, $value)
270+
public function setOption(string $option, $value)
279271
{
280272
return $this->options[$option] = $value;
281273
}
@@ -1545,8 +1537,8 @@ public function dropDatabase()
15451537
* which is always guaranteed to exist. Mysql: 'mysql', PostgreSQL: 'postgres', etc.
15461538
* This value is set in the Doctrine_Export_{DRIVER} classes if required
15471539
*
1548-
* @param string $info
1549-
* @return void
1540+
* @param array $info
1541+
* @return Doctrine_Connection
15501542
*/
15511543
public function getTmpConnection($info)
15521544
{
@@ -1569,7 +1561,7 @@ public function getTmpConnection($info)
15691561
$username = $this->getOption('username');
15701562
$password = $this->getOption('password');
15711563

1572-
$conn = $this->getManager()->openConnection(array($pdoDsn, $username, $password), 'doctrine_tmp_connection', false);
1564+
$conn = $this->getManager()->openConnection([$pdoDsn, $username, $password], 'doctrine_tmp_connection', false);
15731565
$conn->setOption('username', $username);
15741566
$conn->setOption('password', $password);
15751567

0 commit comments

Comments
 (0)