# avstudnitz/scopehint2

> Displays a hint when a configuration value is overwritten on a lower scope (website or store view).

`composer require avstudnitz/scopehint2`

Canonical URL: https://packagento.com/avstudnitz/scopehint2

## At a glance

- **Vendor**: avstudnitz (https://packagento.com/avstudnitz.md)
- **Latest version**: 1.3.4 — released 2025-05-05
- **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/avstudnitz/scopehint2 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 avstudnitz/scopehint2:*
   bin/magento setup:upgrade
   bin/magento setup:di:compile
   bin/magento cache:flush
   ```

## What it does

Displays a hint when a configuration value is overwritten on a lower scope (website or store view).

## README

AvS_ScopeHint for Magento 2
=====================
Displays a hint when a configuration value is overwritten on a lower scope (website or store view).

Facts
-----
- [extension on GitHub](https://github.com/avstudnitz/AvS_ScopeHint2)
- [direct download link](https://github.com/avstudnitz/AvS_ScopeHint2/archive/master.tar.gz)
- Composer key: `avstudnitz/scopehint2` (registered at Packagist)

Description
-----------
Whenever a configuration setting is overwritten by a lower level website or store view, an icon is displayed.
On Mouseover, a list of all stores / websites which overwrite the setting is shown with the respective values.
See the screenshot to get an impression of what the module does:

![Screenshot](scopehint2-screenshot.png?raw=true "ScopeHint for Magento 2")

The module also optionally displays the configuration code (which is used for `ScopeConfigInterface::getValue()`) with the configuration fields.
This is on by default, and can be enabled/disabled in
Stores -> Settings -> Configuration -> Advanced -> Developer -> Debug -> `Display path for each option in system configuration`

Requirements
------------
- PHP >= 5.6.0

Compatibility
-------------
- Magento  >= 2.1.0 (not tested on 2.0.x)

Installation Instructions
-------------------------

#### Via Composer:

1. Call `composer require avstudnitz/scopehint2` in your Magento root dir from the command line

#### Via Download

1. Copy all the files into the newly created directory 
`app/code/AvS/ScopeHint/` in the Magento 2 root.

#### In both cases:

2. Enable the extension by calling `bin/magento module:enable AvS_ScopeHint`.
3. Run `bin/magento setup:upgrade`.

Uninstallation
--------------
1. Uninstall the extension by calling `bin/magento module:uninstall AvS_ScopeHint`.
2. Remove all extension files from `app/code/AvS/ScopeHint/` or use Composer to remove the extension if you have installed it with Composer

Support
-------
If you have any issues with this extension, open an issue on [GitHub](https://github.com/avstudnitz/AvS_ScopeHint2/issues).

Contribution
------------
Any contribution is highly appreciated. The best way to contribute code is to open a [pull request on GitHub](https://help.github.com/articles/using-pull-requests).

Developer
---------
Andreas von Studnitz

[@avstudnitz](https://www.linkedin.com/in/andreasv1/)

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

Copyright
---------
(c) 2017-2024 Andreas von Studnitz

## Recent Versions

| Version | Released |
|---|---|
| 1.3.4 | 2025-05-05 |
| 1.3.3 | 2025-03-10 |
| 1.3.2 | 2025-01-27 |
| 1.3.1 | 2025-01-15 |
| 1.3.0 | 2024-11-28 |
| 1.2.4 | 2024-11-28 |
| 1.2.3 | 2024-11-26 |
| 1.2.2 | 2023-04-06 |
| 1.2.1 | 2022-11-07 |
| 1.2.0 | 2022-10-17 |

Showing 10 of 21 versions. Full release history on https://packagento.com/avstudnitz/scopehint2.

## Dependencies

### Require

| Package | Constraint |
|---|---|
| magento/framework | ~102.0\|~103.0 |
| magento/module-config | ~100.0\|~101.0 |

## Quality

Latest release (1.3.4) 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 | Warning | 11 | 11 warnings (ruleset: Magento2) — 5 auto-fixable with phpcbf |
| PHPMD | Warning | 10 | 10 rule violations (IfStatementAssignment:4, UnusedFormalParameter:3, UnusedLocalVariable:1, CyclomaticComplexity:1, NPathComplexity:1) |
| Cpd | Pass | 0 |  |
| Composer validate | Pass | 0 |  |

#### 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 | 3 | 3 | – | – |
| 2.4.8 | – | 3 | 3 | – |
| 2.4.9 | – | – | 3 | 3 |


### 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 | 1 | 1 | – | – |
| 2.4.8 | – | 1 | 1 | – |
| 2.4.9 | – | – | 1 | 1 |


### 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=["avstudnitz/scopehint2"],
  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

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

