Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
FROM php:8.0-cli

# Arguments defined in devcontainer.json
ARG VARIANT=8.0
ARG USER_UID=1000
ARG USER_GID=$USER_UID

# Install packages and PHP extensions based on composer.json requirements
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get install -y --no-install-recommends \
git \
curl \
unzip \
zip \
libxml2-dev \
&& docker-php-ext-install -j$(nproc) \
dom \
&& apt-get clean -y && rm -rf /var/lib/apt/lists/*

# Install Xdebug for development
RUN pecl install xdebug \
&& docker-php-ext-enable xdebug

# Create a non-root user to use
RUN groupadd --gid $USER_GID vscode \
&& useradd --uid $USER_UID --gid $USER_GID -m vscode \
&& apt-get update \
&& apt-get install -y sudo \
&& echo vscode ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/vscode \
&& chmod 0440 /etc/sudoers.d/vscode

# Set up Composer
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
ENV COMPOSER_ALLOW_SUPERUSER=1

# Configure PHP with proper settings for development
COPY php.ini /usr/local/etc/php/conf.d/php-custom.ini

USER vscode
25 changes: 25 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"name": "PHP Feed-IO",
"build": {
"dockerfile": "Dockerfile",
"args": {
"VARIANT": "8.0"
}
},
"customizations": {
"vscode": {
"extensions": [
"bmewburn.vscode-intelephense-client",
"xdebug.php-debug",
"neilbrayfield.php-docblocker",
"mehedidracula.php-namespace-resolver"
],
"settings": {
"php.validate.executablePath": "/usr/local/bin/php"
}
}
},
"forwardPorts": [8000],
"postCreateCommand": "composer install",
"remoteUser": "vscode"
}
9 changes: 9 additions & 0 deletions .devcontainer/php.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
; Custom PHP settings for development

memory_limit = 256M
max_execution_time = 120
upload_max_filesize = 50M
post_max_size = 50M
date.timezone = UTC
display_errors = On
error_reporting = E_ALL
1 change: 0 additions & 1 deletion .github/FUNDING.yml

This file was deleted.

42 changes: 0 additions & 42 deletions .github/workflows/ci.yml

This file was deleted.

39 changes: 39 additions & 0 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Unit Tests

on:
pull_request:
branches: [release/5.3.x]

jobs:
test:
runs-on: ubuntu-latest

strategy:
matrix:
php-version: ['8.0', '8.1', '8.2', '8.3']
fail-fast: false

steps:
- uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: dom, json, libxml
coverage: xdebug

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ matrix.php-version }}-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-${{ matrix.php-version }}-

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

- name: Run test suite
run: make test
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ artifacts/
vendor/
.php_cs.cache
.phpunit.result.cache
.vscode
8 changes: 6 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
{
"name": "debril/feed-io",
"name": "php-feed-io/feed-io",
"description": "PHP library built to consume and serve JSONFeed / RSS / Atom feeds",
"keywords": ["rss", "atom","jsonfeed", "feed", "news", "CLI", "client"],
"homepage": "https://feed-io.net",
"homepage": "https://php-feed-io.github.io/feed-io/",
"type": "library",
"license": "MIT",
"authors": [
{
"name": "Benjamin Brahmer",
"email": "[email protected]"
},
{
"name": "Alexandre Debril",
"email": "[email protected]"
Expand Down
Loading