Skip to content
This repository has been archived by the owner on Feb 6, 2025. It is now read-only.

Merge release 2.8.0 into 3.0.x #877

Open
wants to merge 30 commits into
base: 3.0.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
3a4a5a7
Update actions/checkout digest to 8ade135
renovate[bot] Sep 22, 2023
dfe19a5
Update actions/checkout digest to b4ffde6
renovate[bot] Oct 19, 2023
406aa10
Update actions/setup-node action to v3.8.2
renovate[bot] Oct 23, 2023
ec7343e
Update actions/setup-node action to v4
renovate[bot] Oct 23, 2023
f25046e
Update dependency matthiasnoback/symfony-dependency-injection-test to v5
renovate[bot] Nov 22, 2023
c2d054a
Bump postcss from 8.4.14 to 8.4.31
dependabot[bot] Oct 6, 2023
5ea5227
Bump @babel/traverse from 7.21.2 to 7.23.2
dependabot[bot] Oct 18, 2023
2818fdb
Update tools
core23 Dec 3, 2023
9b26b59
Fix CS
core23 Dec 3, 2023
fd9eaa3
Update actions/setup-node action to v4.0.1
renovate[bot] Dec 18, 2023
f802f09
Bump to symfony ^6.4 || ^7.0
core23 Dec 21, 2023
e936b60
Update dependency symfony/phpunit-bridge to v7
renovate[bot] Dec 21, 2023
f7ea661
Bump follow-redirects from 1.14.8 to 1.15.4
dependabot[bot] Jan 9, 2024
375ef81
Update dependency sass-loader to v14
renovate[bot] Jan 15, 2024
44886da
Update actions/setup-node action to v4.0.2
renovate[bot] Feb 7, 2024
1d420f7
Bump webpack-dev-middleware from 5.3.3 to 5.3.4
dependabot[bot] Mar 23, 2024
7408e5e
Bump follow-redirects from 1.15.4 to 1.15.6
dependabot[bot] Mar 16, 2024
dc60a84
Update dependency psalm/plugin-phpunit to ^0.19
renovate[bot] Mar 15, 2024
2c07b0d
2.7.0 readiness
nucleos-bot Mar 25, 2024
49f2160
Bumps changelog version to 2.8.0
core23 Mar 25, 2024
0d9b73e
Bump express from 4.18.1 to 4.19.2
dependabot[bot] Mar 28, 2024
3fe1740
Update frontend dependencies
core23 May 26, 2024
7056901
Update dependency eslint to v9
renovate[bot] May 26, 2024
9b8ea9a
Use stable pipelines
core23 May 26, 2024
3c10239
Update dependency sass-loader to v15
renovate[bot] Jul 23, 2024
fd7c3ac
Update dependency sass-loader to v16
renovate[bot] Jul 26, 2024
731ff5e
Bump ws from 8.6.0 to 8.17.1
dependabot[bot] Jun 19, 2024
0aee2f9
Bump braces from 3.0.2 to 3.0.3
dependabot[bot] Jun 16, 2024
5369c5d
Fix symfony deprecation
core23 Aug 14, 2024
aa3ee1d
2.8.0 readiness
nucleos-bot Aug 14, 2024
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
4 changes: 2 additions & 2 deletions .github/workflows/assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:

steps:
- name: "Checkout"
uses: "actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac" # v4
uses: "actions/checkout@v4"

- name: "Using Node"
uses: "actions/setup-node@v3.8.1"
uses: "actions/setup-node@v4"

- name: "Install dependencies"
run: "yarn"
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ jobs:
with:
PHP_EXTENSIONS: "mbstring"
SYMFONY_KERNEL: "Nucleos\\GDPRBundle\\Tests\\App\\AppKernel"
SYMFONY_VERSIONS: "6.4,7.0"
secrets:
CODECOV_TOKEN: "${{ secrets.CODECOV_TOKEN }}"
60 changes: 49 additions & 11 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,65 @@

All notable changes to this project will be documented in this file, in reverse chronological order by release.

## 2.7.0 - TBD
## 2.8.0 - 2024-08-14

### Added

- Nothing.
-----

### Changed
### Release Notes for [2.8.0](https://github.com/nucleos/NucleosGDPRBundle/milestone/13)

Feature release (minor)

### 2.8.0

- Total issues resolved: **0**
- Total pull requests resolved: **5**
- Total contributors: **2**

#### Enhancement

- Nothing.
- [876: Fix symfony deprecation](https://github.com/nucleos/NucleosGDPRBundle/pull/876) thanks to @core23

### Deprecated
#### dependency

- Nothing.
- [872: Bump ws from 8.6.0 to 8.17.1](https://github.com/nucleos/NucleosGDPRBundle/pull/872) thanks to @dependabot[bot]
- [871: Bump braces from 3.0.2 to 3.0.3](https://github.com/nucleos/NucleosGDPRBundle/pull/871) thanks to @dependabot[bot]
- [867: Update frontend dependencies](https://github.com/nucleos/NucleosGDPRBundle/pull/867) thanks to @core23
- [859: Bump express from 4.18.1 to 4.19.2](https://github.com/nucleos/NucleosGDPRBundle/pull/859) thanks to @dependabot[bot]

### Removed
## 2.7.0 - 2024-03-25


-----

- Nothing.
### Release Notes for [2.7.0](https://github.com/nucleos/NucleosGDPRBundle/milestone/12)

### Fixed
Feature release (minor)

### 2.7.0

- Total issues resolved: **0**
- Total pull requests resolved: **10**
- Total contributors: **3**

#### dependency

- [857: Bump webpack-dev-middleware from 5.3.3 to 5.3.4](https://github.com/nucleos/NucleosGDPRBundle/pull/857) thanks to @dependabot[bot]
- [856: Bump follow-redirects from 1.15.4 to 1.15.6](https://github.com/nucleos/NucleosGDPRBundle/pull/856) thanks to @dependabot[bot]
- [855: Update dependency psalm/plugin-phpunit to ^0.19](https://github.com/nucleos/NucleosGDPRBundle/pull/855) thanks to @renovate[bot]
- [850: Bump to symfony ^6.4 || ^7.0](https://github.com/nucleos/NucleosGDPRBundle/pull/850) thanks to @core23
- [847: Update dependency symfony/phpunit-bridge to v7](https://github.com/nucleos/NucleosGDPRBundle/pull/847) thanks to @renovate[bot]
- [846: Update dependency matthiasnoback/symfony-dependency-injection-test to v5](https://github.com/nucleos/NucleosGDPRBundle/pull/846) thanks to @renovate[bot]

#### dependency,javascript

- [851: Bump follow-redirects from 1.14.8 to 1.15.4](https://github.com/nucleos/NucleosGDPRBundle/pull/851) thanks to @dependabot[bot]
- [836: Bump @babel/traverse from 7.21.2 to 7.23.2](https://github.com/nucleos/NucleosGDPRBundle/pull/836) thanks to @dependabot[bot]
- [835: Bump postcss from 8.4.14 to 8.4.31](https://github.com/nucleos/NucleosGDPRBundle/pull/835) thanks to @dependabot[bot]

#### Enhancement

- Nothing.
- [848: Update tools ](https://github.com/nucleos/NucleosGDPRBundle/pull/848) thanks to @core23

## 2.6.0 - 2023-07-20

Expand Down
22 changes: 11 additions & 11 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,20 +45,20 @@
"php": "^8.1",
"sonata-project/block-bundle": "^4.21 || ^5.0",
"sonata-project/form-extensions": "^1.19 || ^2.0",
"symfony/dependency-injection": "^5.4 || ^6.2",
"symfony/event-dispatcher": "^5.4 || ^6.2",
"symfony/expression-language": "^5.4 || ^6.2",
"symfony/framework-bundle": "^5.4.19 || ^6.2.5",
"symfony/http-foundation": "^5.4 || ^6.2",
"symfony/http-kernel": "^5.4 || ^6.2",
"symfony/options-resolver": "^5.4 || ^6.2",
"symfony/twig-bundle": "^5.4 || ^6.2"
"symfony/dependency-injection": "^6.4 || ^7.0",
"symfony/event-dispatcher": "^6.4 || ^7.0",
"symfony/expression-language": "^6.4 || ^7.0",
"symfony/framework-bundle": "^6.4 || ^7.0",
"symfony/http-foundation": "^6.4 || ^7.0",
"symfony/http-kernel": "^6.4 || ^7.0",
"symfony/options-resolver": "^6.4 || ^7.0",
"symfony/twig-bundle": "^6.4 || ^7.0"
},
"require-dev": {
"ergebnis/composer-normalize": "^2.0.1",
"symfony/browser-kit": "^5.4 || ^6.2",
"symfony/console": "^5.4 || ^6.2",
"symfony/yaml": "^5.4 || ^6.2"
"symfony/browser-kit": "^6.4 || ^7.0",
"symfony/console": "^6.4 || ^7.0",
"symfony/yaml": "^6.4 || ^7.0"
},
"suggest": {
"nucleos/shariff-bundle": "If you need a GDPR conform social media widget integration"
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@
"devDependencies": {
"@babel/core": "^7.20.12",
"@babel/preset-env": "^7.20.2",
"@size-limit/esbuild": "^9.0.0",
"@size-limit/preset-small-lib": "^9.0.0",
"@size-limit/esbuild": "^11.1.4",
"@size-limit/preset-small-lib": "^11.1.4",
"@symfony/webpack-encore": "^4.2.0",
"@babel/eslint-parser": "^7.11.0",
"babel-loader": "^9.0.0",
"eslint": "^8.32.0",
"eslint": "^9.0.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-loader": "^4.0.0",
"eslint-plugin-import": "^2.27.5",
"eslint-watch": "^8.0.0",
"sass": "^1.57.1",
"sass-loader": "^13.2.0",
"size-limit": "^9.0.0",
"sass-loader": "^16.0.0",
"size-limit": "^11.1.4",
"webpack": "^5.72",
"webpack-cli": "^5.0.0"
},
Expand Down
5 changes: 5 additions & 0 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,8 @@ parameters:
count: 1
path: tests/Block/Service/GDPRInformationBlockServiceIntegrationTest.php

-
message: "#^Dynamic call to static method PHPUnit\\\\Framework\\\\TestCase\\:\\:createStub\\(\\)\\.$#"
count: 10
path: tests/EventListener/KernelEventSubscriberTest.php

13 changes: 7 additions & 6 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false" colors="true" processIsolation="false" stopOnFailure="false" bootstrap="tests/bootstrap.php" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.0/phpunit.xsd" cacheDirectory=".phpunit.cache">
<coverage>
<include>
<directory suffix=".php">./src/</directory>
</include>
</coverage>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false" colors="true" processIsolation="false" stopOnFailure="false" bootstrap="tests/bootstrap.php" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd" cacheDirectory=".phpunit.cache">
<coverage/>
<php>
<env name="SYMFONY_DEPRECATIONS_HELPER" value="max[self]=0"/>
</php>
Expand All @@ -13,4 +9,9 @@
<directory>./tests/</directory>
</testsuite>
</testsuites>
<source>
<include>
<directory suffix=".php">./src/</directory>
</include>
</source>
</phpunit>
2 changes: 1 addition & 1 deletion psalm-baseline.xml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<files psalm-version="3.14.2@3538fe1955d47f6ee926c0769d71af6db08aa488"/>
<files psalm-version="5.16.0@2897ba636551a8cb61601cc26f6ccfbba6c36591"/>
4 changes: 1 addition & 3 deletions src/Block/Service/GDPRInformationBlockService.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,7 @@ public function configureSettings(OptionsResolver $resolver): void
]);
}

public function validate(ErrorElement $errorElement, BlockInterface $block): void
{
}
public function validate(ErrorElement $errorElement, BlockInterface $block): void {}

public function getMetadata(): MetadataInterface
{
Expand Down
2 changes: 1 addition & 1 deletion src/DependencyInjection/NucleosGDPRExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
use Nucleos\GDPRBundle\EventListener\KernelEventSubscriber;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Extension\Extension;
use Symfony\Component\DependencyInjection\Loader;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;

final class NucleosGDPRExtension extends Extension
{
Expand Down
4 changes: 1 addition & 3 deletions src/NucleosGDPRBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,4 @@

use Symfony\Component\HttpKernel\Bundle\Bundle;

final class NucleosGDPRBundle extends Bundle
{
}
final class NucleosGDPRBundle extends Bundle {}
1 change: 0 additions & 1 deletion src/Resources/config/block.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,5 @@
new Reference('twig'),
new Reference('request_stack'),
])

;
};
1 change: 0 additions & 1 deletion src/Resources/config/listener.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,5 @@
null,
false,
])

;
};
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ public function testRender(): void

$client->request('GET', '/twig-test');

static::assertSame(200, $client->getResponse()->getStatusCode());
self::assertSame(200, $client->getResponse()->getStatusCode());
}
}
18 changes: 9 additions & 9 deletions tests/Block/Service/GDPRInformationBlockServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function testExecute(): void

$response = new Response();

$this->twig->expects(static::once())->method('render')
$this->twig->expects(self::once())->method('render')
->with(
'@NucleosGDPR/Block/block_gdpr.html.twig',
[
Expand All @@ -84,8 +84,8 @@ public function testExecute(): void

$blockService = new GDPRInformationBlockService($this->twig, $this->requestStack);

static::assertSame($response, $blockService->execute($blockContext, $response));
static::assertSame('TWIG_CONTENT', $response->getContent());
self::assertSame($response, $blockService->execute($blockContext, $response));
self::assertSame('TWIG_CONTENT', $response->getContent());
}

public function testExecuteWithExistingCookie(): void
Expand All @@ -104,7 +104,7 @@ public function testExecuteWithExistingCookie(): void
$blockService = new GDPRInformationBlockService($this->twig, $this->requestStack);
$response = $blockService->execute($blockContext);

static::assertTrue($response->isEmpty());
self::assertTrue($response->isEmpty());
}

public function testGetMetadata(): void
Expand All @@ -113,10 +113,10 @@ public function testGetMetadata(): void

$metadata = $blockService->getMetadata();

static::assertSame('nucleos_gdpr.block.information', $metadata->getTitle());
static::assertNull($metadata->getImage());
static::assertSame('NucleosGDPRBundle', $metadata->getDomain());
static::assertSame([
self::assertSame('nucleos_gdpr.block.information', $metadata->getTitle());
self::assertNull($metadata->getImage());
self::assertSame('NucleosGDPRBundle', $metadata->getDomain());
self::assertSame([
'class' => 'fa fa-balance-scale',
], $metadata->getOptions());
}
Expand All @@ -128,7 +128,7 @@ public function testConfigureEditForm(): void
$block = new Block();

$formMapper = $this->createMock(FormMapper::class);
$formMapper->expects(static::once())->method('add');
$formMapper->expects(self::once())->method('add');

$blockService->configureEditForm($formMapper, $block);
}
Expand Down
8 changes: 4 additions & 4 deletions tests/DependencyInjection/ConfigurationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function testDefaultOptions(): void
],
];

static::assertSame($expected, $config);
self::assertSame($expected, $config);
}

public function testEnabledGoogleFLoC(): void
Expand All @@ -48,7 +48,7 @@ public function testEnabledGoogleFLoC(): void
],
];

static::assertSame($expected, $config);
self::assertSame($expected, $config);
}

public function testBlockedCookieEnabled(): void
Expand All @@ -68,7 +68,7 @@ public function testBlockedCookieEnabled(): void
],
];

static::assertSame($expected, $config);
self::assertSame($expected, $config);
}

public function testBlockedCookieOptions(): void
Expand All @@ -90,6 +90,6 @@ public function testBlockedCookieOptions(): void
],
];

static::assertSame($expected, $config);
self::assertSame($expected, $config);
}
}
14 changes: 7 additions & 7 deletions tests/EventListener/KernelEventSubscriberTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function testCleanCookiesWithDisabledOption(): void
$subscriber = new KernelEventSubscriber(null);
$subscriber->cleanCookies($event);

static::assertCount(4, $response->headers->getCookies());
self::assertCount(4, $response->headers->getCookies());
$this->assertHasCookie(self::SOME_COOKIE_NAME, $response);
$this->assertHasCookie(self::KEEP_COOKIE_NAME, $response);
$this->assertHasCookie(self::KEEP_REGED_EXAMPLE, $response);
Expand Down Expand Up @@ -73,7 +73,7 @@ public function testCleanCookiesWithConsent(): void
]);
$subscriber->cleanCookies($event);

static::assertCount(4, $response->headers->getCookies());
self::assertCount(4, $response->headers->getCookies());
$this->assertHasCookie(self::SOME_COOKIE_NAME, $response);
$this->assertHasCookie(self::KEEP_COOKIE_NAME, $response);
$this->assertHasCookie(self::KEEP_REGED_EXAMPLE, $response);
Expand All @@ -100,7 +100,7 @@ public function testCleanCookiesWithNoConsent(): void
]);
$subscriber->cleanCookies($event);

static::assertCount(2, $response->headers->getCookies());
self::assertCount(2, $response->headers->getCookies());
$this->assertHasCookie(self::KEEP_COOKIE_NAME, $response);
$this->assertHasCookie(self::KEEP_REGED_EXAMPLE, $response);
}
Expand All @@ -119,8 +119,8 @@ public function testAddFLoCPolicy(): void
$subscriber = new KernelEventSubscriber(null, false);
$subscriber->addFLoCPolicy($event);

static::assertTrue($response->headers->has('Permissions-Policy'));
static::assertSame('interest-cohort=()', $response->headers->get('Permissions-Policy'));
self::assertTrue($response->headers->has('Permissions-Policy'));
self::assertSame('interest-cohort=()', $response->headers->get('Permissions-Policy'));
}

public function testAddFLoCPolicyWithDisabledOption(): void
Expand All @@ -137,12 +137,12 @@ public function testAddFLoCPolicyWithDisabledOption(): void
$subscriber = new KernelEventSubscriber(null, true);
$subscriber->addFLoCPolicy($event);

static::assertFalse($response->headers->has('Permissions-Policy'));
self::assertFalse($response->headers->has('Permissions-Policy'));
}

private function assertHasCookie(string $cookieName, Response $response): void
{
static::assertCount(1, array_filter($response->headers->getCookies(), static function (Cookie $cookie) use ($cookieName): bool {
self::assertCount(1, array_filter($response->headers->getCookies(), static function (Cookie $cookie) use ($cookieName): bool {
return $cookie->getName() === $cookieName;
}));
}
Expand Down
2 changes: 1 addition & 1 deletion tests/NucleosGDPRBundleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ public function testGetContainerExtension(): void
{
$bundle = new NucleosGDPRBundle();

static::assertInstanceOf(NucleosGDPRExtension::class, $bundle->getContainerExtension());
self::assertInstanceOf(NucleosGDPRExtension::class, $bundle->getContainerExtension());
}
}
Loading