Skip to content

Commit

Permalink
Merge branch 'FriendsOfSymfony1:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
mcgrogan91 authored Apr 2, 2024
2 parents 755d0a5 + 931eef1 commit 67f6cb6
Show file tree
Hide file tree
Showing 144 changed files with 1,869 additions and 2,296 deletions.
48 changes: 48 additions & 0 deletions .docker/php53/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
FROM buildpack-deps:jessie

ENV PHP_VERSION 5.3.29

# php 5.3 needs older autoconf
RUN set -eux; \
\
apt-get update; \
apt-get install -y \
curl \
autoconf2.13 \
; \
rm -r /var/lib/apt/lists/*; \
\
curl -sSLfO http://launchpadlibrarian.net/140087283/libbison-dev_2.7.1.dfsg-1_amd64.deb; \
curl -sSLfO http://launchpadlibrarian.net/140087282/bison_2.7.1.dfsg-1_amd64.deb; \
dpkg -i libbison-dev_2.7.1.dfsg-1_amd64.deb; \
dpkg -i bison_2.7.1.dfsg-1_amd64.deb; \
rm *.deb; \
\
curl -sSLf "https://php.net/get/php-$PHP_VERSION.tar.bz2/from/this/mirror" -o php.tar.bz2; \
echo 'c4e1cf6972b2a9c7f2777a18497d83bf713cdbecabb65d3ff62ba441aebb0091 php.tar.bz2' | sha256sum -cw --status; \
\
mkdir -p /usr/src/php; \
tar -xf php.tar.bz2 -C /usr/src/php --strip-components=1; \
rm php.tar.bz2*; \
\
cd /usr/src/php; \
./buildconf --force; \
./configure --disable-cgi \
$(command -v apxs2 > /dev/null 2>&1 && echo '--with-apxs2' || true) \
--with-pdo-mysql \
--with-zlib \
--enable-mbstring \
; \
make -j"$(nproc)"; \
make install; \
\
dpkg -r \
bison \
libbison-dev \
; \
apt-get purge -y --auto-remove \
autoconf2.13 \
; \
rm -r /usr/src/php

CMD ["php", "-a"]
5 changes: 5 additions & 0 deletions .docker/php54/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM php:5.4-cli

RUN docker-php-ext-install pdo
RUN docker-php-ext-install pdo_mysql
RUN docker-php-ext-install mbstring
6 changes: 6 additions & 0 deletions .docker/php55_71/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
ARG PHP_TAG
FROM php:${PHP_TAG}

RUN docker-php-ext-install pdo
RUN docker-php-ext-install pdo_mysql
RUN docker-php-ext-install mbstring
22 changes: 22 additions & 0 deletions .docker/php72_73/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
ARG PHP_VERSION
FROM php:${PHP_VERSION}-cli

RUN docker-php-ext-install pdo
RUN docker-php-ext-install pdo_mysql
RUN docker-php-ext-install mbstring

# For consistent mime type file guesser
RUN set -eux; \
distFilePath=`which file`; \
\
mv ${distFilePath} ${distFilePath}.dist; \
{ \
echo '#! /bin/sh -eu'; \
echo ''; \
echo "${distFilePath}"'.dist "$@" | sed -e s,application/x-pie-executable,application/x-executable,g'; \
} | tee ${distFilePath}; \
\
chmod +x ${distFilePath}; \
\
file /bin/ls --mime | grep application/x-executable; \
:;
34 changes: 34 additions & 0 deletions .docker/php74_82/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
ARG PHP_VERSION
FROM php:${PHP_VERSION}-cli

RUN docker-php-ext-install pdo
RUN docker-php-ext-install pdo_mysql

# Install mbstring PHP extension
#
RUN set -eux; \
apt-get update; \
apt-get install -y --no-upgrade --no-install-recommends \
libonig-dev \
; \
\
apt-get clean; \
rm -rf /var/lib/apt/lists/*; \
\
docker-php-ext-install mbstring

# For consistent mime type file guesser
RUN set -eux; \
distFilePath=`which file`; \
\
mv ${distFilePath} ${distFilePath}.dist; \
{ \
echo '#! /bin/sh -eu'; \
echo ''; \
echo "${distFilePath}"'.dist "$@" | sed -e s,application/x-pie-executable,application/x-executable,g'; \
} | tee ${distFilePath}; \
\
chmod +x ${distFilePath}; \
\
file /bin/ls --mime | grep application/x-executable; \
:;
7 changes: 4 additions & 3 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/.docker export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.travis.yml export-ignore
/build.properties.dev export-ignore
/build.xml export-ignore
/.github export-ignore

/docker-compose.yml
/tests export-ignore
/tools export-ignore
65 changes: 65 additions & 0 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: "Continuous Integration"

on:
pull_request:
branches:
- master
paths:
- .github/workflows/continuous-integration.yml
- composer.*
- lib/**
- tests/**

push:
branches:
- master
paths:
- .github/workflows/continuous-integration.yml
- composer.*
- lib/**
- tests/**

env:
fail-fast: true

jobs:
tests:
name: "Doctrine1 Tests"
runs-on: "ubuntu-latest"

strategy:
matrix:
php-version:
- "7.4"
- "8.0"
- "8.1"
- "8.2"
- "8.3"

steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: "true"

- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php-version }}"

- name: Get composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache dependencies
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-

- name: Install dependencies
run: composer install --prefer-dist

- name: Run Tests
run: cd tests && php run.php
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
tests/DoctrineTest/doctrine_tests/*
*TestCase.php
*TestCase.php
/composer.lock
/tests/tmp
/tests/foo.sq3
/vendor/
35 changes: 0 additions & 35 deletions .travis.yml

This file was deleted.

54 changes: 54 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
Doctrine1
=========

About this version
------------------

This is a community driven fork of doctrine 1, as official support has been interrupted long time ago.

**Do not use it for new projects: this version is great to improve existing symfony1 applications using doctrine1, but [Doctrine2](https://www.doctrine-project.org/projects/orm.html) is the way to go today.**


Requirements
------------

PHP 5.3 and up.


Installation
------------

Using [Composer](http://getcomposer.org/doc/00-intro.md) as dependency management:

composer require friendsofsymfony1/doctrine1 "1.4.*"
composer install



Tests
-----

### Prerequisites

* docker-engine version 17.12.0+
* docker-compose version 1.20.0+

### How to execute all tests on all supported PHP versions and dependencies?

tests/bin/test

### When you finish your work day, do not forget to clean up your desk

docker-compose down


Documentation
-------------

Read the official [doctrine1 documentation](https://web.archive.org/web/20171008235327/http://docs.doctrine-project.org:80/projects/doctrine1/en/latest/en/manual/index.html)


Contributing
------------

You can send pull requests or create an issue.
11 changes: 0 additions & 11 deletions build.properties.dev

This file was deleted.

Loading

0 comments on commit 67f6cb6

Please sign in to comment.