Skip to content

Commit 18f036f

Browse files
committed
Update the repo after the fork.
- Changes links in multiple places - Adds mkdocs instead of github pages, all content copied - Adds dependabot to mange upgrades of php packages and actions - Fresh setup for unit tests in github actions to see if the tests work or not - Adding devcontainer to make it easier to work on this project with a certain php version
1 parent 7d0bad4 commit 18f036f

File tree

16 files changed

+2158
-1446
lines changed

16 files changed

+2158
-1446
lines changed

.devcontainer/Dockerfile

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
FROM php:8.1-cli
2+
3+
# Arguments defined in devcontainer.json
4+
ARG VARIANT=8.1
5+
ARG USER_UID=1000
6+
ARG USER_GID=$USER_UID
7+
8+
# Install packages and PHP extensions based on composer.json requirements
9+
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
10+
&& apt-get install -y --no-install-recommends \
11+
git \
12+
curl \
13+
unzip \
14+
zip \
15+
libxml2-dev \
16+
&& docker-php-ext-install -j$(nproc) \
17+
dom \
18+
&& apt-get clean -y && rm -rf /var/lib/apt/lists/*
19+
20+
# Install Xdebug for development
21+
RUN pecl install xdebug \
22+
&& docker-php-ext-enable xdebug
23+
24+
# Create a non-root user to use
25+
RUN groupadd --gid $USER_GID vscode \
26+
&& useradd --uid $USER_UID --gid $USER_GID -m vscode \
27+
&& apt-get update \
28+
&& apt-get install -y sudo \
29+
&& echo vscode ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/vscode \
30+
&& chmod 0440 /etc/sudoers.d/vscode
31+
32+
# Set up Composer
33+
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
34+
ENV COMPOSER_ALLOW_SUPERUSER=1
35+
36+
# Configure PHP with proper settings for development
37+
COPY php.ini /usr/local/etc/php/conf.d/php-custom.ini
38+
39+
USER vscode

.devcontainer/devcontainer.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"name": "PHP Feed-IO",
3+
"build": {
4+
"dockerfile": "Dockerfile",
5+
"args": {
6+
"VARIANT": "8.1"
7+
}
8+
},
9+
"customizations": {
10+
"vscode": {
11+
"extensions": [
12+
"bmewburn.vscode-intelephense-client",
13+
"xdebug.php-debug",
14+
"neilbrayfield.php-docblocker",
15+
"mehedidracula.php-namespace-resolver"
16+
],
17+
"settings": {
18+
"php.validate.executablePath": "/usr/local/bin/php"
19+
}
20+
}
21+
},
22+
"forwardPorts": [8000],
23+
"postCreateCommand": "composer install",
24+
"remoteUser": "vscode"
25+
}

.devcontainer/php.ini

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
; Custom PHP settings for development
2+
3+
memory_limit = 256M
4+
max_execution_time = 120
5+
upload_max_filesize = 50M
6+
post_max_size = 50M
7+
date.timezone = UTC
8+
display_errors = On
9+
error_reporting = E_ALL

.github/dependabot.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
# Maintain dependencies for Composer
9+
- package-ecosystem: "composer"
10+
directory: "/"
11+
schedule:
12+
interval: "daily"
13+
versioning-strategy: increase
14+
15+
# Maintain dependencies for GitHub Actions
16+
- package-ecosystem: "github-actions"
17+
directory: "/"
18+
schedule:
19+
interval: "daily"

.github/workflows/build-docs.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Publish docs via GitHub Pages
2+
on:
3+
push:
4+
branches:
5+
- main
6+
paths:
7+
- 'docs/**'
8+
9+
jobs:
10+
build:
11+
name: Deploy docs
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout main
15+
uses: actions/checkout@v4
16+
17+
- name: Deploy docs
18+
uses: mhausenblas/mkdocs-deploy-gh-pages@master
19+
# Or use mhausenblas/mkdocs-deploy-gh-pages@nomaterial to build without the mkdocs-material theme
20+
env:
21+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22+
#CUSTOM_DOMAIN: optionaldomain.com
23+
#CONFIG_FILE: folder/mkdocs.yml
24+
#EXTRA_PACKAGES: build-base
25+
# GITHUB_DOMAIN: github.myenterprise.com

.github/workflows/ci.yml

Lines changed: 0 additions & 43 deletions
This file was deleted.

.github/workflows/unit-tests.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Unit Tests
2+
3+
on:
4+
pull_request:
5+
branches: [ main]
6+
7+
jobs:
8+
test:
9+
runs-on: ubuntu-latest
10+
11+
strategy:
12+
matrix:
13+
php-version: ['8.1', '8.2', '8.3', '8.4']
14+
fail-fast: false
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Setup PHP
20+
uses: shivammathur/setup-php@v2
21+
with:
22+
php-version: ${{ matrix.php-version }}
23+
extensions: dom, json, libxml
24+
coverage: xdebug
25+
26+
- name: Cache Composer packages
27+
id: composer-cache
28+
uses: actions/cache@v3
29+
with:
30+
path: vendor
31+
key: ${{ runner.os }}-php-${{ matrix.php-version }}-${{ hashFiles('**/composer.lock') }}
32+
restore-keys: |
33+
${{ runner.os }}-php-${{ matrix.php-version }}-
34+
35+
- name: Install dependencies
36+
run: composer install --prefer-dist --no-progress
37+
38+
- name: Run test suite
39+
run: make test

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ vendor/
44
.phpunit.result.cache
55
.php-cs-fixer.cache
66
phpunit.xml
7+
.vscode/

.scrutinizer.yml

Lines changed: 0 additions & 11 deletions
This file was deleted.

.travis.yml

Lines changed: 0 additions & 38 deletions
This file was deleted.

0 commit comments

Comments
 (0)