mathiaspalmqvist 392aec8529
Fix PHP code style issues / php-code-styling (push) Waiting to run
PHPStan / phpstan (push) Waiting to run
run-tests / P8.3 - L11.* - prefer-lowest - ubuntu-latest (push) Waiting to run
run-tests / P8.3 - L11.* - prefer-stable - ubuntu-latest (push) Waiting to run
run-tests / P8.4 - L11.* - prefer-lowest - ubuntu-latest (push) Waiting to run
run-tests / P8.4 - L11.* - prefer-stable - ubuntu-latest (push) Waiting to run
run-tests / P8.3 - L12.* - prefer-lowest - ubuntu-latest (push) Waiting to run
run-tests / P8.3 - L12.* - prefer-stable - ubuntu-latest (push) Waiting to run
run-tests / P8.4 - L12.* - prefer-lowest - ubuntu-latest (push) Waiting to run
run-tests / P8.4 - L12.* - prefer-stable - ubuntu-latest (push) Waiting to run
dependabot-auto-merge / dependabot (pull_request_target) Skipped
Fix packaging, timezone handling and HTML cleaning bugs
- Replace symfony 7.4.x-dev constraints with stable ranges so the
  package installs with minimum-stability stable
- Add the Cision facade referenced in composer.json and a config file
  (slug, timezone); the constructor now falls back to config('cision.slug')
- Convert feed timestamps with a real timezone instead of a hardcoded +2h,
  which was off by an hour during winter time
- Return false from fetchContent() when the request fails or the page
  has no article/heading, instead of throwing
- Fix italic paragraph detection, which never matched
- Fix literal '\n' in HtmlCleaner whitespace cleanup
- Normalize empty feed elements to empty strings
- Update README and add tests for the above
2026-11-11 20:37:05 +01:00
2022-09-30 14:28:00 +01:00
2025-07-04 21:40:54 +02:00
2025-07-04 19:44:34 +00:00
2025-07-04 20:04:02 +02:00
2025-07-04 21:25:38 +02:00
2025-07-04 21:25:38 +02:00
2025-07-04 21:25:38 +02:00

Laravel Cision Feed

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

A Laravel package for retrieving and parsing data from Cision News. Fetch press releases, financial reports, media posts, and structured article content using a simple and expressive API.


Features

  • Retrieve Cision RSS feeds by type (Press, News, Financial, Media)
  • Parse article pages and extract clean structured HTML
  • Automatically handles encoding, formatting, and clean-up of content
  • Fully testable and extensible

Installation

composer require mattitjaab/laravel-cision-feed

Set your Cision newsroom slug in your .env:

LARAVEL_CISION_FEED_SLUG=your-cision-slug

Optionally publish the config file:

php artisan vendor:publish --tag="laravel-cision-feed-config"

Feed timestamps (created_at) are converted to Europe/Stockholm by default. Override with LARAVEL_CISION_FEED_TIMEZONE.


Usage

use Mattitja\Cision\Cision;

$cision = new Cision();              // uses config('cision.slug')
$cision = new Cision('other-company'); // or pass a slug explicitly

// Fetch RSS entries
$items = $cision->press(); // or ->news(), ->financial(), ->media()

// Fetch full content for a specific article
$article = $cision->fetchContent('https://news.cision.com/se/example-company/r/your-article-slug,c1234567');

echo $article['header'];       // Article headline
echo $article['published_at']; // ISO timestamp
echo $article['content'];      // Clean HTML

Or use the facade:

use Mattitja\Cision\Facades\Cision;

$items = Cision::press();

All methods return false if the request fails or the response cannot be parsed.


Testing

composer test

Changelog

See CHANGELOG for recent changes.


Contributing

Contributions are welcome! Please open an issue or pull request.


Security

If you discover any security-related issues, please refer to our security policy.


Credits


License

The MIT License (MIT). See LICENSE for details.

S
Description
No description provided
Readme MIT
199 KiB
0 Stars 1 Watchers 0 Forks
v3.0
Latest
2026-11-11 19:46:32 +00:00
Languages
PHP 97.7%
HTML 2.3%