Skip to content
Closed
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
27 changes: 27 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/php
{
"name": "FMSummernoteBundle Dev Container",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/php:8.4",

// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},

// Configure tool-specific properties.
"customizations": {
// Configure properties specific to VS Code.
"vscode": {
"settings": {},
"extensions": [
"streetsidesoftware.code-spell-checker"
]
}
}

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "sudo chmod a+x \"$(pwd)\" && sudo rm -rf /var/www/html && sudo ln -s \"$(pwd)\" /var/www/html"

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
48 changes: 35 additions & 13 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# OS: Linux; Symfony: latest stable; PHP: all the commonly used versions supported by this bundle
name: "Tests - Linux"
name: "Tests"

on:
pull_request:
push:
branches:
- 'master'
- 'main'
tags:
- '*'

env:
fail-fast: true
Expand All @@ -17,26 +19,46 @@ jobs:
continue-on-error: false
strategy:
matrix:
php-version: ['7.4', '8.0', '8.1']
php-version: ['8.1', '8.2', '8.3']
steps:
- name: 'Checkout code'
uses: actions/checkout@v2.3.3
uses: actions/checkout@v4

- name: 'Install PHP with extensions'
uses: shivammathur/setup-php@2.7.0
uses: shivammathur/setup-php@v2
with:
coverage: none
coverage: xdebug
php-version: ${{ matrix.php-version }}
tools: composer:v2
extensions: mbstring, intl, pdo, pdo_sqlite, sqlite3
ini-values: date.timezone=UTC

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

- name: 'Install Composer dependencies'
run: |
composer global require --no-progress --no-scripts --no-plugins symfony/flex
composer update --no-interaction --prefer-dist --optimize-autoloader --prefer-stable
vendor/bin/simple-phpunit install
- name: 'Run tests'
composer validate --strict
composer install --prefer-dist --no-progress --no-suggest --optimize-autoloader --no-interaction

- name: 'Run PHPUnit'
env:
SYMFONY_DEPRECATIONS_HELPER: 'max[indirect]=10&max[total]=27'
run: vendor/bin/simple-phpunit -v
SYMFONY_DEPRECATIONS_HELPER: max[total]=0
run: php -d memory_limit=-1 ./vendor/bin/phpunit --coverage-clover=coverage.xml

- name: 'Upload code coverage (if token available)'
if: success() && github.event_name == 'push' && github.ref == 'refs/heads/master'
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: |
if [ -n "$CODECOV_TOKEN" ]; then
curl -s https://codecov.io/bash | bash -s -- -t $CODECOV_TOKEN -f coverage.xml || echo "Codecov upload failed"
else
echo "Skipping code coverage upload - no token available"
fi
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,7 @@
# Composer PHAR
/composer.phar
.php_cs.cache
composer.lock
var
.phpunit.cache
.phpunit.result.cache
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.0.0] - 2025-08-23

### Added
- Support for PHP 8.2 and 8.3
- Support for Symfony 6.x and 7.x
- GitHub Actions workflow improvements with better caching and test coverage

### Changed
- **BREAKING**: Dropped support for PHP < 8.1
- **BREAKING**: Dropped support for Symfony < 6.0
- Updated development dependencies to their latest stable versions
- Updated CI/CD pipeline to use latest GitHub Actions versions
- Improved test suite configuration

### Removed
- Removed support for deprecated Symfony versions (4.x, 5.x)
- Removed support for PHP 7.4

## [1.0.0] - 2023-01-01

Initial stable release.
45 changes: 20 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,43 +1,38 @@
FMSummernoteBundle
==================
# FMSummernoteBundle

FMSummernoteBundle adds [summernote](https://github.com/summernote/summernote) bundle
[![Tests](https://github.com/helios-ag/FMSummernoteBundle/actions/workflows/test.yaml/badge.svg)](https://github.com/helios-ag/FMSummernoteBundle/actions/workflows/test.yaml)
[![StyleCI](https://github.styleci.io/repos/43000455/shield?branch=master)](https://github.styleci.io/repos/43000455)
[![Total Downloads](https://poser.pugx.org/helios-ag/fm-summernote-bundle/downloads)](https://packagist.org/packages/helios-ag/fm-summernote-bundle)
[![Latest Stable Version](https://poser.pugx.org/helios-ag/fm-summernote-bundle/v/stable)](https://packagist.org/packages/helios-ag/fm-summernote-bundle)
[![License](https://poser.pugx.org/helios-ag/fm-summernote-bundle/license)](https://packagist.org/packages/helios-ag/fm-summernote-bundle)

FMSummernoteBundle integrates the [Summernote WYSIWYG editor](https://summernote.org/) with Symfony applications.

| Tests | StyleCI | Downloads | Version | License |
|---------|---------|-----------|---------|---------|
|[![Tests - Linux](https://github.com/helios-ag/FMSummernoteBundle/actions/workflows/test.yaml/badge.svg)](https://github.com/helios-ag/FMSummernoteBundle/actions/workflows/test.yaml)|[![StyleCI](https://github.styleci.io/repos/43000455/shield?branch=master)](https://github.styleci.io/repos/43000455)|[![Total Downloads](https://poser.pugx.org/helios-ag/fm-summernote-bundle/downloads)](https://packagist.org/packages/helios-ag/fm-summernote-bundle)|[![Latest Stable Version](https://poser.pugx.org/helios-ag/fm-summernote-bundle/v/stable)](https://packagist.org/packages/helios-ag/fm-summernote-bundle)|[![License](https://poser.pugx.org/helios-ag/fm-summernote-bundle/license)](https://packagist.org/packages/helios-ag/fm-summernote-bundle)|
## Requirements

- PHP 8.0 or higher
- Symfony 6.0 or higher
- jQuery (can be included automatically)

## Installation

### Step 1: Install the bundle

### Step 1: Installation

Using Composer, just add the following configuration to your `composer.json`:

Or you can use composer to install this bundle:
Add FMSummernoteBundle in your composer.json:

```sh
```bash
composer require helios-ag/fm-summernote-bundle
```

### Step 2: Enable the bundle

Finally, enable the bundle in the kernel:
If you're using Symfony Flex, the bundle will be enabled automatically. Otherwise, enable it in your `config/bundles.php` file:

``` php
<?php
// app/AppKernel.php
```php
// config/bundles.php

public function registerBundles()
{
$bundles = array(
// ...
new FM\SummernoteBundle\FMSummernoteBundle(),
);
}
return [
// ...
FM\SummernoteBundle\FMSummernoteBundle::class => ['all' => true],
];
```

## Configuration
Expand Down
87 changes: 62 additions & 25 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,44 +1,81 @@
{
"name": "helios-ag/fm-summernote-bundle",
"description": "Summernote bundle, adds Summernote WYSIWYG editor to your Symfony2/3/4 project",
"keywords": ["summernote","WYSIWYG", "editor"],
"description": "Summernote bundle, adds Summernote WYSIWYG editor to your Symfony project",
"keywords": ["summernote", "WYSIWYG", "editor", "symfony"],
"type": "symfony-bundle",
"homepage": "https://github.com/helios-ag/FMSummernoteBundle",
"license": "MIT",
"minimum-stability": "dev",
"minimum-stability": "stable",
"authors": [
{
"name": "Al Ganiev",
"email": "helios.ag@gmail.com"
},
{
"name": "Symfony Community",
"homepage": "https://github.com/helios-ag/FMSummernoteBundle/contributors"
}
{
"name": "Al Ganiev",
"email": "helios.ag@gmail.com"
},
{
"name": "Symfony Community",
"homepage": "https://github.com/helios-ag/FMSummernoteBundle/contributors"
}
],
"require": {
"php": "^7.4 || ^8.0 || ^8.1",
"symfony/framework-bundle": "^4.4 || ^5.0 || ^5.2 || ^6.0",
"symfony/twig-bundle": "^4.4 || ^5.0 || ^5.2 || ^6.0"
"php": "^8.1",
"ext-json": "*",
"symfony/config": "^6.4 || ^7.0",
"symfony/dependency-injection": "^6.4 || ^7.0",
"symfony/framework-bundle": "^6.4 || ^7.0",
"symfony/http-kernel": "^6.4 || ^7.0",
"symfony/twig-bundle": "^6.4 || ^7.0"
},
"require-dev" : {
"symfony/phpunit-bridge": "^4.3.5 || ^5.0 || ^5.2 || ^6.0",
"matthiasnoback/symfony-config-test": "^4.0",
"matthiasnoback/symfony-dependency-injection-test": "^4.1"
"require-dev": {
"phpunit/phpunit": "^10.5",
"symfony/phpunit-bridge": "^6.4 || ^7.0",
"matthiasnoback/symfony-config-test": "^5.0",
"matthiasnoback/symfony-dependency-injection-test": "^5.0",
"phpstan/phpstan": "^1.10",
"phpstan/phpstan-phpunit": "^1.3",
"phpstan/phpstan-symfony": "^1.3",
"phpstan/extension-installer": "^1.3",
"rector/rector": "^1.0",
"vimeo/psalm": "^5.22",
"symfony/var-dumper": "^6.4 || ^7.0"
},
"suggest": {
"helios-ag/fm-elfinder-bundle": "Elfinder bundle, file manager",
"helios-ag/fm-rfm-bundle": "Richfilemanager bundle, file manager"
"helios-ag/fm-elfinder-bundle": "Elfinder bundle, file manager",
"helios-ag/fm-rfm-bundle": "Richfilemanager bundle, file manager"
},
"autoload": {
"psr-4": { "FM\\SummernoteBundle\\": "src/" }
"psr-4": {
"FM\\SummernoteBundle\\": "src/"
}
},
"autoload-dev": {
"psr-4": { "FM\\SummernoteBundle\\Tests\\": "tests/" }
"psr-4": {
"FM\\SummernoteBundle\\Tests\\": "tests/"
}
},
"config": {
"allow-plugins": {
"phpstan/extension-installer": true,
"symfony/flex": true
},
"sort-packages": true,
"platform": {
"php": "8.1.0"
}
},
"extra": {
"branch-alias": {
"dev-master": "1.0-dev"
}
"branch-alias": {
"dev-master": "2.0-dev"
},
"symfony": {
"allow-contrib": true
}
},
"scripts": {
"test": "phpunit",
"test:coverage": "XDEBUG_MODE=coverage phpunit --coverage-html=var/coverage",
"phpstan": "phpstan analyse",
"psalm": "psalm",
"cs-check": "php-cs-fixer fix --dry-run --diff",
"cs-fix": "php-cs-fixer fix"
}
}
33 changes: 16 additions & 17 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>

<!-- https://phpunit.de/manual/current/en/appendixes.configuration.html -->
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/6.1/phpunit.xsd"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.0/phpunit.xsd"
backupGlobals="false"
colors="true"
bootstrap="vendor/autoload.php"
>
cacheResultFile=".phpunit.cache/test-results"
executionOrder="random"
beStrictAboutOutputDuringTests="true">
<php>
<server name="KERNEL_DIR" value="./Tests/Functional" />
<ini name="error_reporting" value="-1" />
Expand All @@ -22,20 +22,19 @@
</testsuite>
</testsuites>

<filter>
<whitelist addUncoveredFilesFromWhitelist="true">
<directory>./</directory>
<exclude>
<directory>./src/Controller</directory>
<directory>./src/Resources</directory>
<directory>./tests</directory>
<directory>./vendor</directory>
</exclude>
</whitelist>
</filter>
<coverage processUncoveredFiles="true">
<include>
<directory suffix=".php">./</directory>
</include>
<exclude>
<directory>./src/Controller</directory>
<directory>./src/Resources</directory>
<directory>./tests</directory>
<directory>./vendor</directory>
</exclude>
</coverage>

<logging>
<!-- and this is where your report will be written -->
<log type="coverage-clover" target="./clover.xml"/>
<junit outputFile="var/junit.xml"/>
</logging>
</phpunit>
Loading