Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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.1-cli

# Arguments defined in devcontainer.json
ARG VARIANT=8.1
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.1"
}
},
"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
19 changes: 19 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
# Maintain dependencies for Composer
- package-ecosystem: "composer"
directory: "/"
schedule:
interval: "daily"
versioning-strategy: increase

# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
25 changes: 25 additions & 0 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Publish docs via GitHub Pages
on:
push:
branches:
- main
paths:
- 'docs/**'

jobs:
build:
name: Deploy docs
runs-on: ubuntu-latest
steps:
- name: Checkout main
uses: actions/checkout@v4

- name: Deploy docs
uses: mhausenblas/mkdocs-deploy-gh-pages@master
# Or use mhausenblas/mkdocs-deploy-gh-pages@nomaterial to build without the mkdocs-material theme
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
#CUSTOM_DOMAIN: optionaldomain.com
#CONFIG_FILE: folder/mkdocs.yml
#EXTRA_PACKAGES: build-base
# GITHUB_DOMAIN: github.myenterprise.com
43 changes: 0 additions & 43 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: [ main]

jobs:
test:
runs-on: ubuntu-latest

strategy:
matrix:
php-version: ['8.1', '8.2', '8.3', '8.4']
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 @@ -4,3 +4,4 @@ vendor/
.phpunit.result.cache
.php-cs-fixer.cache
phpunit.xml
.vscode/
11 changes: 0 additions & 11 deletions .scrutinizer.yml

This file was deleted.

38 changes: 0 additions & 38 deletions .travis.yml

This file was deleted.

1 change: 1 addition & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
The MIT License (MIT)

Copyright (c) 2014 alexdebril
Copyright (c) 2025 the php-feed-io project

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
10 changes: 3 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
# feed-io

[![Latest Stable Version](https://poser.pugx.org/debril/feed-io/v/stable.png)](https://packagist.org/packages/debril/feed-io)
[![Build Status](https://github.com/alexdebril/feed-io/actions/workflows/ci.yml/badge.svg)](https://github.com/alexdebril/feed-io/actions/workflows/ci.yml/)
[![Maintainability](https://api.codeclimate.com/v1/badges/c418d2c84346aa398d19/maintainability)](https://codeclimate.com/github/alexdebril/feed-io/maintainability)
[![Test Coverage](https://api.codeclimate.com/v1/badges/c418d2c84346aa398d19/test_coverage)](https://codeclimate.com/github/alexdebril/feed-io/test_coverage)

[feed-io](https://github.com/alexdebril/feed-io) is a PHP library built to consume and serve news feeds. It features:
[feed-io](https://github.com/php-feed-io/feed-io) is a PHP library built to consume and serve news feeds. It features:

- JSONFeed / Atom / RSS read and write support
- Feeds auto-discovery through HTML headers
Expand All @@ -21,7 +17,7 @@
- A generic HTTP ClientInterface
- Integrates with every [PSR-18 compatible HTTP client](https://www.php-fig.org/psr/psr-18/).

This library is highly extensible and is designed to adapt to many situations, so if you don't find a solution through the documentation feel free to ask in the [discussions](https://github.com/alexdebril/feed-io/discussions).
This library is highly extensible and is designed to adapt to many situations, so if you don't find a solution through the documentation feel free to ask in the [discussions](https://github.com/php-feed-io/feed-io/discussions).

# Installation

Expand Down Expand Up @@ -53,7 +49,7 @@ Let's suppose you installed feed-io using Composer, you can use its command line

## reading

feed-io is designed to read feeds across the internet and to publish your own. Its main class is [FeedIo](https://github.com/alexdebril/feed-io/blob/master/src/FeedIo/FeedIo.php) :
feed-io is designed to read feeds across the internet and to publish your own. Its main class is [FeedIo](https://github.com/php-feed-io/feed-io/blob/master/src/FeedIo/FeedIo.php) :

```php

Expand Down
3 changes: 3 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@
"config": {
"preferred-install": {
"*": "dist"
},
"allow-plugins": {
"php-http/discovery": false
}
}
}
Loading