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
2 changes: 1 addition & 1 deletion .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
# Or use mhausenblas/mkdocs-deploy-gh-pages@nomaterial to build without the mkdocs-material theme
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
EXTRA_PACKAGES: build-base pygments
#CUSTOM_DOMAIN: optionaldomain.com
#CONFIG_FILE: folder/mkdocs.yml
#EXTRA_PACKAGES: build-base
# GITHUB_DOMAIN: github.myenterprise.com
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@ vendor/
.php-cs-fixer.cache
phpunit.xml
.vscode/
phpstan.neon
phpstan.neon
# mkdocs
site
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# feed-io

[![Packagist](https://img.shields.io/packagist/v/php-feed-io/feed-io.svg)](https://packagist.org/packages/php-feed-io/feed-io)
[![Documentation](https://img.shields.io/badge/docs-latest-blue.svg)](https://php-feed-io.github.io/feed-io/)

**📖 [Read the full documentation](https://php-feed-io.github.io/feed-io/)**

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This document explains which attributes are supported by feed-io and how to acce

## top level document : feed (atom) / channel (rss) / top-level (json)

interface : FeedInterface
**interface : FeedInterface**

| atom | rss | json | getter | setter |
| --------------- | ----------------------- | ------------- | --------------- | --------------- |
Expand Down Expand Up @@ -36,7 +36,7 @@ interface : FeedInterface

## entry (atom) / item (rss) / item (json)

Interface : ItemInterface
**Interface : ItemInterface**

| atom | rss | json | getter | setter |
| ------------------- | ----------- | --------------------------- | --------------- | --------------- |
Expand Down
10 changes: 9 additions & 1 deletion UPGRADE-3.0.md → docs/upgrades/UPGRADE-3.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ In version 2.x FeedIo::format() returned a DomDocument. Now that feed-io support
Before :

```php
<?php

// Feed creation
$feed = new \FeedIo\Feed();

Expand All @@ -27,6 +29,8 @@ Now you get the string :


```php
<?php

// Feed creation
$feed = new \FeedIo\Feed();

Expand All @@ -43,6 +47,8 @@ Instead of a DomDocument.
Before :

```php
<?php

$feedIo = \FeedIo\Factory::create()->getFeedIo();

$result = $feedIo->read('http://php.net/feed.atom');
Expand All @@ -54,6 +60,8 @@ $dom = $result->getDocument();
After :

```php
<?php

$feedIo = \FeedIo\Factory::create()->getFeedIo();

$result = $feedIo->read('http://php.net/feed.atom');
Expand All @@ -62,7 +70,7 @@ $dom = $result->getDocument()->getDOMDocument();

```

This is because Result::getDocument()'s return value is a wrapper for both XML and JSON streams.
This is because `Result::getDocument()`'s return value is a wrapper for both XML and JSON streams.

### That's it

Expand Down
22 changes: 14 additions & 8 deletions UPGRADE-4.0.md → docs/upgrades/UPGRADE-4.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,20 @@ The major change in version 4.0 is the full migration to PHP 7.1. It has an impa

From now on, all types are explicits in method signatures. It has an impact on classes that implements :

- \FeedIo\FeedInterface
- \FeedIo\Feed\ItemInterface
- \FeedIo\Feed\NodeInterface
- \FeedIo\Feed\ElementsAwareInterface
- \FeedIo\Feed\Item\AuthorInterface
- \FeedIo\Feed\Item\MediaInterface
- \FeedIo\Feed\Node\CategoryInterface
- \FeedIo\Feed\Node\ElementInterface
- `\FeedIo\FeedInterface`
- `\FeedIo\Feed\ItemInterface`
- `\FeedIo\Feed\NodeInterface`
- `\FeedIo\Feed\ElementsAwareInterface`
- `\FeedIo\Feed\Item\AuthorInterface`
- `\FeedIo\Feed\Item\MediaInterface`
- `\FeedIo\Feed\Node\CategoryInterface`
- `\FeedIo\Feed\Node\ElementInterface`

For instance, `FeedIo\FeedInterface::setUrl($url)` becomes :

```php
<?php

/**
* @param string $url
* @return FeedInterface
Expand All @@ -27,6 +29,8 @@ For instance, `FeedIo\FeedInterface::setUrl($url)` becomes :
As a consequence, you need to adapt any class that implements `FeedIo\FeedInterface` according to the new signature :

```php
<?php

/**
* @param string $url
* @return FeedInterface
Expand All @@ -41,6 +45,8 @@ As a consequence, you need to adapt any class that implements `FeedIo\FeedInterf
becomes :

```php
<?php

/**
* @param string $url
* @return FeedInterface
Expand Down
File renamed without changes.
File renamed without changes.
19 changes: 19 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,26 @@
site_name: feed-io Documentation
theme:
name: material
features:
- content.code.copy


nav:
- Home: index.md
- Code Quality: codecontributions.md
- Specification: specifications-support.md
- Upgrade:
- Upgrade to v3: upgrades/UPGRADE-3.0.md
- Upgrade to v4: upgrades/UPGRADE-4.0.md
- Upgrade to v5: upgrades/UPGRADE-5.0.md
- Upgrade to v6: upgrades/UPGRADE-6.0.md

markdown_extensions:
- pymdownx.highlight:
use_pygments: true
anchor_linenums: true
line_spans: __span
pygments_lang_class: true
- pymdownx.inlinehilite
- pymdownx.snippets
- pymdownx.superfences