# veriteworks/cookiefix

> Magento2 extension for Cookie SameSite attribute.

`composer require veriteworks/cookiefix`

Canonical URL: https://packagento.com/veriteworks/cookiefix

## At a glance

- **Vendor**: veriteworks (https://packagento.com/veriteworks.md)
- **Latest version**: 3.2.2 — released 2026-06-04
- **Pricing**: Free
- **Package type**: Magento 2 module
- **Status**: active, accepting new buyers

## Installation

Packagento is licence-gated, so even free packages need a licence on a project before Composer can resolve them.

1. **Sign in or create an account** at https://packagento.com/customer/account/.

2. **Add the package to your account.** Open https://packagento.com/veriteworks/cookiefix and complete the free checkout. A licence is minted automatically.

3. **Create or pick a project, then activate the licence on it.**
   - Projects represent the Magento installs you deploy to. Manage them at https://packagento.com/projects/.
   - Activate the new licence on the project you'll deploy this package to. Activation is what generates the Composer credentials scoped to that project.

4. **Add the project credentials to your Magento codebase.**

   Grab the project's public + private key from https://packagento.com/projects/ (open the project, then its Credentials tab), and add them to `auth.json`:

   ```json
   {
     "http-basic": {
       "packagento.com": {
         "username": "ppk_live_...",
         "password": "psk_live_..."
       }
     }
   }
   ```

   Add the Packagento Composer repository to `composer.json`:

   ```json
   {
     "repositories": [
       { "type": "composer", "url": "https://packagento.com" }
     ]
   }
   ```

5. **Install and apply.**

   ```bash
   composer require veriteworks/cookiefix:*
   bin/magento setup:upgrade
   bin/magento setup:di:compile
   bin/magento cache:flush
   ```

## What it does

Magento2 extension for Cookie SameSite attribute.

## README

This extension is adjusting Cookie SameSite attribute issue since Chrome 80.

**NOTICE: this extension is experimental.**

## Features
Add SameSite attribute into Magento session cookie. For 3DS payment, payment gateways tend to send request via POST to Magento based website. However without SameSite=None for session cookie, Magento cannot continue any PHP session state.
This extension set SameSite=None and make customers place order via 3DS payment or other ID integrations. 

## How to install
 + composer require veriteworks/cookiefix
 + bin/magento module:enable Veriteworks_CookieFix
 + bin/magento setup:upgrade
 
## Configuration

After 3.0.0-beta1, you can change SameSite cookie configuration from admin panel. Go to "Stores > configuration > web" and open cookie section. You can see "SameSite" field.
By default, this extension sets SameSite configuration value to limited cookies. If you hope to update the list, please update web/cookie/affected_keys configuration value. 

## Support

If you have any issues about this extension, open an issue on Github.
Technical support question is same. 

## Contribution

Any contributions are highly appreciated. Please send me a pull request.

## License

[Open Software License 3.0](http://opensource.org/licenses/osl-3.0.php)

## Copyright

(c) 2020 Veriteworks Inc.

## Recent Versions

| Version | Released |
|---|---|
| 3.2.2 | 2026-06-04 |
| 3.2.1 | 2025-10-24 |
| 3.2.0 | 2025-06-11 |
| 3.1.2 | 2024-05-14 |
| 3.1.1 | 2024-04-22 |
| 3.1.0 | 2024-04-22 |
| 3.0.5 | 2023-09-08 |
| 3.0.4 | 2023-06-01 |
| 3.0.3 | 2023-03-31 |
| 3.0.2 | 2022-05-25 |

Showing 10 of 29 versions. Full release history on https://packagento.com/veriteworks/cookiefix.

## Dependencies

### Require

| Package | Constraint |
|---|---|
| lib-libxml | * |
| magento/framework | ~102.0.6-p1\|\|~103.0.1 |
| php | ~8.1.0\|\|~8.2.0\|\|~8.3.0\|\|~8.4.0\|\|~8.5.0 |

## Quality

Latest release (3.2.2) fails the Packagento QA pipeline. Verdicts below are per-cell (Magento line × PHP version) for the matrixed tools, and run-once for the static / security tiers.


### Compatibility

Each Magento line is installed on its supported PHP versions, then the module is built (DI compile + static-content deploy). Cells show passed / failed / untested; staircase gaps render as `–`.

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | Pass | Pass | – | – |
| 2.4.8 | – | Pass | Pass | – |
| 2.4.9 | – | – | Pass | Pass |


### Code Quality

Advisory checks against the module's source. Never affect the Compatibility verdict — a phpcs finding can't make a module incompatible.

#### Static Analysis

Coding standards (phpcs), mess detection (phpmd), copy-pasted code (cpd), PHP cross-version compatibility, composer.json validity. Each runs once for the whole module.

| Tool | Status | Findings | Summary |
|---|---|---|---|
| PHPCS | Pass | 0 |  |
| PHPMD | Warning | 2 | 2 rule violations (UnusedFormalParameter:1, TooManyPublicMethods:1) |
| Cpd | Pass | 0 |  |
| Composer validate | Info | 1 | valid; 1 advisory note (composer validate --strict) |

#### PHPStan

Type-checks the module against a real Magento install. Re-runs per Magento + PHP version because resolvable symbols differ between releases.

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | 2 | 2 | – | – |
| 2.4.8 | – | 2 | 2 | – |
| 2.4.9 | – | – | 2 | 2 |


### Tests

Unit and integration suites run per Magento + PHP cell. Test failures speak to the module's behaviour, not its compatibility with a line, so they're reported here separately.

#### Unit Tests

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | N/A | N/A | – | – |
| 2.4.8 | – | N/A | N/A | – |
| 2.4.9 | – | – | N/A | N/A |

#### Integration Tests

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | N/A | N/A | – | – |
| 2.4.8 | – | N/A | N/A | – |
| 2.4.9 | – | – | N/A | N/A |


### Security

Dependency-advisory audit (composer audit) plus a source malware scan. A malware detection fails the version outright.

| Tool | Status | Findings | Summary |
|---|---|---|---|
| Composer audit | Pass | 0 |  |
| Malware scan | Pass | 0 |  |

## Licence and pricing

Free. A licence is still minted on checkout and bound to your project for Composer access — no payment step.

Refundable within 14 days of first purchase via https://packagento.com/account/refunds/.

## Install via Claude Code or any MCP client

The Packagento MCP server can run the licence + project + Composer steps above in one tool call:

```
purchase_and_install_packages(
  composer_names=["veriteworks/cookiefix"],
  project_id="proj_xxx"
)
```

This handles cart, checkout, licence minting, project activation, and writes auth.json credentials. Connect a client with `claude mcp add packagento https://mcp.packagento.com`. Full setup at https://packagento.com/docs/mcp-setup.

## Vendor

veriteworks is a Magento 2 vendor on Packagento. See https://packagento.com/veriteworks.md for their full catalogue.

