Skip to content

Commit

Permalink
Merge pull request #1515 from jadu/redevelop
Browse files Browse the repository at this point in the history
Release/14.0.0 into develop
  • Loading branch information
Stanton authored May 18, 2023
2 parents 9d8a03a + 9730847 commit 4dcc36e
Show file tree
Hide file tree
Showing 423 changed files with 2,041 additions and 2,186 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,17 @@ jobs:
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ['8.1']

steps:
- uses: actions/checkout@v2

- name: Setup PHP with PECL extension
- name: PHP ${{ matrix.php-versions }}
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
php-version: ${{ matrix.php-versions }}

- name: Validate composer.json and composer.lock
run: composer validate --strict
Expand All @@ -48,5 +51,5 @@ jobs:
with:
configuration: phpunit.xml.dist
memory_limit: 256M
version: '9.5.0'
php_version: '7.4'
version: '9.5.10'
php_version: ${{ matrix.php-versions }}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ pulsar.zip
/ngrok
/.vagrant
/phpunit
.phpunit.result.cache
/docs
.phpunit.result.cache
*.cache
2 changes: 1 addition & 1 deletion .phpunit.result.cache

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "13.0.6"
"version": "13.1.0"
}
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
}
},
"require": {
"twig/twig": "^1.21"
"twig/twig": "^2.0"
},
"require-dev": {
"symfony/yaml": "*"
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: '2'
services:
web:
image: php:7.2-apache
image: php:8.1-apache
working_dir: /var/www/html
volumes:
- ./:/var/www/html/:cached
Expand Down
1 change: 1 addition & 0 deletions js/PulsarFormComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ PulsarFormComponent.prototype.initColourpickers = function () {
$pickerInput.insertAfter($input);

// changing the picker should update the input
/* istanbul ignore next: won't test spectrum internals */
$pickerInput.spectrum({
color: '#' + $input.val(),
disabled: isDisabled,
Expand Down
3,277 changes: 1,129 additions & 2,148 deletions package-lock.json

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "jadu-pulsar",
"version": "13.0.6",
"private": true,
"version": "13.1.0",
"repository": {
"type": "git",
"url": "https://github.com/jadu/pulsar.git"
Expand Down Expand Up @@ -80,7 +79,7 @@
"uglifyify": "^3.0.1"
},
"dependencies": {
"@fortawesome/fontawesome-free": "^6.4.0",
"@fortawesome/fontawesome-pro": "^6.3.0",
"chartist": "^0.11.4",
"datatables.net": "^1.13.4",
"datatables.net-buttons": "^1.7.1",
Expand Down
1 change: 1 addition & 0 deletions phpinfo.php
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<?php print phpinfo(); ?>
2 changes: 1 addition & 1 deletion pulsar.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "pulsar",
"version": "13.0.6",
"version": "13.1.0",
"base_path": "/"
}
2 changes: 1 addition & 1 deletion stylesheets/_palette.base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ $palette-monochromes: (
gray: (
darker: rgb(62, 62, 62),
dark: rgb(95, 95, 95),
dull: rgb(117, 117, 117),
dull: rgb(110, 110, 110),
base: rgb(126, 126, 126),
light: rgb(157, 157, 157),
lighter: rgb(190, 190, 190),
Expand Down
8 changes: 7 additions & 1 deletion tests/unit/Jadu/Pulsar/Twig/Extension/ArrayExtensionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,16 @@

class ArrayExtensionTest extends \PHPUnit\Framework\TestCase
{
public $loader;
public $env;
public $ext;
public $data;

public function setUp(): void
{
parent::setUp();
$this->env = new \Twig_Environment();
$this->loader = new \Twig_Loader_Filesystem();
$this->env = new \Twig_Environment($this->loader);
$this->ext = new ArrayExtension(array());
$this->data = array('slim' => 'shady', 'marshall' => 'mathers', 'eminem' => true, 'class' => 'wrapper');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@

class AttributeParserExtensionTest extends \PHPUnit\Framework\TestCase
{
public function setUp(): void
public $ext;

public function setUp(): void
{
parent::setUp();
$this->ext = new AttributeParserExtension(array());
Expand Down
3 changes: 3 additions & 0 deletions tests/unit/Jadu/Pulsar/Twig/Extension/ConfigExtensionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

class ConfigExtensionTest extends \PHPUnit\Framework\TestCase
{
public $config;
public $ext;

public function setUp(): void
{
parent::setUp();
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?php

namespace Jadu\Pulsar\Twig\Extension;

use Twig_Environment;
use Twig_Loader_Array;

class ConstantDefinedExtensionTest extends \PHPUnit\Framework\TestCase
{
public $ext;

public function setUp(): void
{
$this->ext = new ConstantDefinedExtension();
}

public function testGetName()
{
$this->assertEquals('constant_defined', $this->ext->getName());
}

public function testConstantDefinedFunction()
{
$loader = new Twig_Loader_Array(array(
'index.html' => '{% if constant_defined("FOO") %}true{% endif %}',
));

$twig = new Twig_Environment($loader);
$twig->addExtension(new ConstantDefinedExtension());

define('FOO', true);

$this->assertEquals('true', $twig->render('index.html'));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

class GetConstantExtensionTest extends \PHPUnit\Framework\TestCase
{
public $ext;

public function setUp(): void
{
parent::setUp();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

class HelperOptionsModifierExtensionTest extends \PHPUnit\Framework\TestCase
{
public $ext;

public function setUp(): void
{
parent::setUp();
Expand All @@ -25,7 +27,7 @@ public function testOptionsModifiedIfHelpSupplied()
$dataIn = array('help' => 'example help');
$result = $this->ext->modifyOptions($dataIn);
self::assertSame('example help', $result['help']);
self::assertRegExp('/^guid-\d+$/', $result['help_id']);
self::assertMatchesRegularExpression('/^guid-\d+$/', $result['help_id']);
}

public function testOptionsModifiedIfErrorSupplied()
Expand All @@ -34,17 +36,17 @@ public function testOptionsModifiedIfErrorSupplied()
$result = $this->ext->modifyOptions($dataIn);
self::assertSame('example error', $result['error']);
self::assertSame(true, $result['has_error']);
self::assertRegExp('/^guid-\d+$/', $result['error_ids'][0]);
self::assertMatchesRegularExpression('/^guid-\d+$/', $result['error_ids'][0]);
}

public function testOptionsModifiedIfHelpAndErrorSupplied()
{
$dataIn = array('error' => 'example error', 'help' => 'example help');
$result = $this->ext->modifyOptions($dataIn);
self::assertSame('example help', $result['help']);
self::assertRegExp('/^guid-\d+$/', $result['help_id']);
self::assertMatchesRegularExpression('/^guid-\d+$/', $result['help_id']);
self::assertSame('example error', $result['error']);
self::assertSame(true, $result['has_error']);
self::assertRegExp('/^guid-\d+$/', $result['error_ids'][0]);
self::assertMatchesRegularExpression('/^guid-\d+$/', $result['error_ids'][0]);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

class RelativeTimeExtensionTest extends \PHPUnit\Framework\TestCase
{
public $ext;

public function setUp(): void
{
parent::setUp();
Expand Down
2 changes: 2 additions & 0 deletions tests/unit/Jadu/Pulsar/Twig/Extension/TabsExtensionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

class TabsExtensionTest extends \PHPUnit\Framework\TestCase
{
public $ext;
public $tabs;

public function setUp(): void
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

class UrlParamsExtensionTest extends \PHPUnit\Framework\TestCase
{
public $ext;

public function setUp(): void
{
parent::setUp();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{% extends '@cssTests/visual-regression-layout.html.twig' %}
{% import '@pulsar/pulsar/v2/helpers/elem.html.twig' as elem %}
{% block body %}
{{
elem.paragraph({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{% extends '@cssTests/visual-regression-layout.html.twig' %}
{% import '@pulsar/pulsar/v2/helpers/flash.html.twig' as flash %}
{% block body %}
{{
flash.message({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{% extends '@cssTests/visual-regression-layout.html.twig' %}
{% import '@pulsar/pulsar/v2/helpers/flash.html.twig' as flash %}
{% block body %}
{{
flash.message({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{% extends '@cssTests/visual-regression-layout.html.twig' %}
{% import '@pulsar/pulsar/v2/helpers/flash.html.twig' as flash %}
{% block body %}
{{
flash.message({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{% extends '@cssTests/visual-regression-layout.html.twig' %}
{% import '@pulsar/pulsar/v2/helpers/flash.html.twig' as flash %}
{% block body %}
{{
flash.message({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{% extends '@cssTests/visual-regression-layout.html.twig' %}
{% import '@pulsar/pulsar/v2/helpers/flash.html.twig' as flash %}
{% block body %}
{{
flash.message({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{% extends '@cssTests/visual-regression-layout.html.twig' %}
{% import '@pulsar/pulsar/v2/helpers/flash.html.twig' as flash %}
{% block body %}
{{
flash.message({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{% extends '@cssTests/visual-regression-layout.html.twig' %}
{% import '@pulsar/pulsar/v2/helpers/form.html.twig' as form %}
{% import '@pulsar/pulsar/v2/helpers/html.html.twig' as html %}
{% block body %}
{{
form.button_group({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{% extends '@cssTests/visual-regression-layout.html.twig' %}
{% import '@pulsar/pulsar/v2/helpers/form.html.twig' as form %}
{% import '@pulsar/pulsar/v2/helpers/html.html.twig' as html %}
{% block body %}
{{
form.button_group({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{% extends '@cssTests/visual-regression-layout.html.twig' %}
{% import '@pulsar/pulsar/v2/helpers/form.html.twig' as form %}
{% import '@pulsar/pulsar/v2/helpers/html.html.twig' as html %}
{% block body %}
{{
form.button_group({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{% extends '@cssTests/visual-regression-layout.html.twig' %}
{% import '@pulsar/pulsar/v2/helpers/form.html.twig' as form %}
{% import '@pulsar/pulsar/v2/helpers/html.html.twig' as html %}
{% block body %}
{{
form.button_group({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{% extends '@cssTests/visual-regression-layout.html.twig' %}
{% import '@pulsar/pulsar/v2/helpers/form.html.twig' as form %}
{% import '@pulsar/pulsar/v2/helpers/html.html.twig' as html %}
{% block body %}
{{
form.button_group({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{% extends '@cssTests/visual-regression-layout.html.twig' %}
{% import '@pulsar/pulsar/v2/helpers/form.html.twig' as form %}
{% import '@pulsar/pulsar/v2/helpers/html.html.twig' as html %}
{% block body %}
{{
form.button_group({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{% extends '@cssTests/visual-regression-layout.html.twig' %}
{% import '@pulsar/pulsar/v2/helpers/form.html.twig' as form %}
{% import '@pulsar/pulsar/v2/helpers/html.html.twig' as html %}
{% block body %}
{{
form.button_group({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{% extends '@cssTests/visual-regression-layout.html.twig' %}
{% import '@pulsar/pulsar/v2/helpers/form.html.twig' as form %}
{% import '@pulsar/pulsar/v2/helpers/html.html.twig' as html %}
{% block body %}
{{
form.button_group({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{% extends '@cssTests/visual-regression-layout.html.twig' %}
{% import '@pulsar/pulsar/v2/helpers/form.html.twig' as form %}
{% import '@pulsar/pulsar/v2/helpers/html.html.twig' as html %}
{% block body %}
{{
form.button_group({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{% extends '@cssTests/visual-regression-layout.html.twig' %}
{% import '@pulsar/pulsar/v2/helpers/form.html.twig' as form %}
{% import '@pulsar/pulsar/v2/helpers/html.html.twig' as html %}
{% block body %}
{{
form.button_group({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{% extends '@cssTests/visual-regression-layout.html.twig' %}
{% import '@pulsar/pulsar/v2/helpers/form.html.twig' as form %}
{% import '@pulsar/pulsar/v2/helpers/html.html.twig' as html %}
{% block body %}
{{
form.button_group({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{% extends '@cssTests/visual-regression-layout.html.twig' %}
{% import '@pulsar/pulsar/v2/helpers/form.html.twig' as form %}
{% import '@pulsar/pulsar/v2/helpers/html.html.twig' as html %}
{% block body %}
{{
form.checkbox({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{% extends '@cssTests/visual-regression-layout.html.twig' %}
{% import '@pulsar/pulsar/v2/helpers/form.html.twig' as form %}
{% import '@pulsar/pulsar/v2/helpers/html.html.twig' as html %}
{% block body %}
{{
form.checkbox({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{% extends '@cssTests/visual-regression-layout.html.twig' %}
{% import '@pulsar/pulsar/v2/helpers/form.html.twig' as form %}
{% import '@pulsar/pulsar/v2/helpers/html.html.twig' as html %}
{% block body %}
{{
form.checkbox({
Expand Down
Loading

0 comments on commit 4dcc36e

Please sign in to comment.