Skip to content

Conversation

@colinmollenhour
Copy link
Member

@colinmollenhour colinmollenhour commented Feb 10, 2025

Follow-up for #4467

This result was created with the following scripts:

pr4467.php

<?php

function processFile($filePath) {
    $content = file_get_contents($filePath);
    if ($content === false) {
        echo "Failed to read file: $filePath\n";
        return;
    }

    // Find all doc blocks
    preg_match_all('/\/\*\*(?:.*?)\*\//s', $content, $matches, PREG_OFFSET_CAPTURE);
    
    if (empty($matches[0])) {
        // No doc blocks found, create new one
        $newDocBlock = createNewDocBlock('');
        $content = "<?php\n" . $newDocBlock . "\n" . trim(preg_replace('/^<\?php\s*/s', '', $content));
    } else {
        // Process existing doc blocks
        $firstBlock = $matches[0][0][0];
        
        // Remove "This file is part of OpenMage" block
        $content = preg_replace('/\/\*\*.*?This file is part of OpenMage.*?\*\//s', '', $content);
        
        // Process second block if it exists
        $freeformText = '';
        if (isset($matches[0][1])) {
            $secondBlock = $matches[0][1][0];
            $secondBlockContent = preg_replace('/\/\*\*\s*|\s*\*\/$/s', '', $secondBlock);
            
            // Extract freeform text (everything before @)
            if (preg_match('/^\s*\*?(.*?)(?=\s*@|$)/s', $secondBlockContent, $textMatch)) {
                $freeformText = preg_replace('/^\s*\*\s*/m', '', trim($textMatch[1]));
                // Remove multiple asterisks
                $freeformText = preg_replace('/\*+\s*/', '', $freeformText);
            }
            
            // Extract existing annotations
            preg_match_all('/@\w+\s+[^\n]+/m', $secondBlockContent, $annotationMatches);
            $existingAnnotations = $annotationMatches[0] ?? [];
            
            // Remove the second block
            $content = str_replace($secondBlock, '', $content);
        }
        
        // Create new doc block
        $newDocBlock = createNewDocBlock($freeformText, $existingAnnotations);
        
        // Ensure PHP open tag is first, followed by doc block and code
        $content = preg_replace('/^\s*/', '', $content);
        $content = preg_replace('/^<\?php\s*/s', '', $content);
        $content = "<?php\n" . $newDocBlock . "\n" . trim($content);
    }
    
    // Write updated content back to file
    if (file_put_contents($filePath, $content) === false) {
        echo "Failed to write file: $filePath\n";
        return;
    }
    
    echo "Processed: $filePath\n";
}

function createNewDocBlock($freeformText, $existingAnnotations = []) {
    $block = "/**\n";
    
    // Add freeform text if it exists
    if (!empty($freeformText)) {
        $block .= " * " . trim($freeformText) . "\n *\n";
    }
    
    // Add required annotations
    $block .= " * @copyright For copyright and license information, read the COPYING.txt file.\n";
    $block .= " * @link /COPYING.txt\n";
    
    // Add @package if it existed before
    foreach ($existingAnnotations as $annotation) {
        if (strpos($annotation, '@package') === 0) {
            $block .= " * " . $annotation . "\n";
            break;
        }
    }
    
    // Add remaining annotations (except @copyright and @link)
    foreach ($existingAnnotations as $annotation) {
        if (strpos($annotation, '@copyright') === 0 || 
            strpos($annotation, '@link') === 0 || 
            strpos($annotation, '@package') === 0) {
            continue;
        }
        $block .= " * " . $annotation . "\n";
    }
    
    $block .= " */";
    return $block;
}

function processDirectory($path) {
    $iterator = new RecursiveIteratorIterator(
        new RecursiveDirectoryIterator($path, RecursiveDirectoryIterator::SKIP_DOTS)
    );
    
    foreach ($iterator as $file) {
        if (!$file->isFile()) {
            continue;
        }
        
        $extension = strtolower($file->getExtension());
        if ($extension === 'php' || $extension === 'phtml') {
            processFile($file->getPathname());
        }
    }
}

// Usage
if ($argc !== 2) {
    echo "Usage: php script.php <directory_path>\n";
    exit(1);
}

$directoryPath = $argv[1];
if (!is_dir($directoryPath)) {
    echo "Error: Directory not found\n";
    exit(1);
}

processDirectory($directoryPath);

apply-pr4467.sh

#!/bin/bash
php pr4467.php app/code/
php pr4467.php lib
php pr4467.php shell
php pr4467.php tests

# delete @category
find app/code -name "*.php" -exec sed -i '/ \* @category/d' {} \;
find errors -name "*.phtml" -exec sed -i '/ \* @category/d' {} \;
find errors -name "*.php" -exec sed -i '/ \* @category/d' {} \;
find lib -name "*.php" -exec sed -i '/ \* @category/d' {} \;
find shell -name "*.php" -exec sed -i '/ \* @category/d' {} \;

# ensure file ends with a newline
find app/code -name "*.php" -type f -exec sed -i -e '$a\' {} \;
find errors -name "*.php" -type f -exec sed -i -e '$a\' {} \;
find errors -name "*.phtml" -type f -exec sed -i -e '$a\' {} \;
find lib -name "*.php" -type f -exec sed -i -e '$a\' {} \;
find shell -name "*.php" -type f -exec sed -i -e '$a\' {} \;

# add back @license line
find app/code -name "*.php" -type f -exec sed -i '/ \* @link \/COPYING.txt/a\ * @license Open Software License (OSL 3.0)' {} \;
find errors -name "*.php" -type f -exec sed -i '/ \* @link \/COPYING.txt/a\ * @license Open Software License (OSL 3.0)' {} \;
find errors -name "*.phtml" -type f -exec sed -i '/ \* @link \/COPYING.txt/a\ * @license Open Software License (OSL 3.0)' {} \;
find lib -name "*.php" -type f -exec sed -i '/ \* @link \/COPYING.txt/a\ * @license Open Software License (OSL 3.0)' {} \;
find shell -name "*.php" -type f -exec sed -i '/ \* @link \/COPYING.txt/a\ * @license Open Software License (OSL 3.0)' {} \;

# PHP CS Fixer
php vendor/bin/php-cs-fixer fix

# fix spacing
find app/code -name "*.php" -type f -exec sed -i 's/ \* @link \/COPYING.txt/\ * @link       \/COPYING.txt/' {} \;
find errors -name "*.php" -type f -exec sed -i 's/ \* @link \/COPYING.txt/\ * @link       \/COPYING.txt/' {} \;
find errors -name "*.phtml" -type f -exec sed -i 's/ \* @link \/COPYING.txt/\ * @link       \/COPYING.txt/' {} \;
find lib -name "*.php" -type f -exec sed -i 's/ \* @link \/COPYING.txt/\ * @link       \/COPYING.txt/' {} \;
find shell -name "*.php" -type f -exec sed -i 's/ \* @link \/COPYING.txt/\ * @link       \/COPYING.txt/' {} \;

find app/code -name "*.php" -type f -exec sed -i 's/ *\* *@license Open Software License (OSL 3.0)/\ * @license    Open Software License (OSL 3.0)/' {} \;
find errors -name "*.php" -type f -exec sed -i 's/ *\* *@license Open Software License (OSL 3.0)/\ * @license    Open Software License (OSL 3.0)/' {} \;
find errors -name "*.phtml" -type f -exec sed -i 's/ *\* *@license Open Software License (OSL 3.0)/\ * @license    Open Software License (OSL 3.0)/' {} \;
find lib -name "*.php" -type f -exec sed -i 's/ *\* *@license Open Software License (OSL 3.0)/\ * @license    Open Software License (OSL 3.0)/' {} \;
find shell -name "*.php" -type f -exec sed -i 's/ *\* *@license Open Software License (OSL 3.0)/\ * @license   Open Software License (OSL 3.0)/' {} \;

find app/code -name "*.php" -type f -exec sed -i 's/ \* @copyright For copyright and license information, read the COPYING.txt file\./ * @copyright  For copyright and license information, read the COPYING.txt file./' {} \;
find errors -name "*.php" -type f -exec sed -i 's/ \* @copyright For copyright and license information, read the COPYING.txt file\./ * @copyright  For copyright and license information, read the COPYING.txt file./' {} \;
find errors -name "*.phtml" -type f -exec sed -i 's/ \* @copyright For copyright and license information, read the COPYING.txt file\./ * @copyright  For copyright and license information, read the COPYING.txt file./' {} \;
find lib -name "*.php" -type f -exec sed -i 's/ \* @copyright For copyright and license information, read the COPYING.txt file\./ * @copyright  For copyright and license information, read the COPYING.txt file./' {} \;
find shell -name "*.php" -type f -exec sed -i 's/ \* @copyright For copyright and license information, read the COPYING.txt file\./ * @copyright  For copyright and license information, read the COPYING.txt file./' {} \;

sreichel and others added 24 commits January 9, 2025 11:57
# Conflicts:
#	app/Mage.php
#	app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tab/Attributes.php
#	app/code/core/Mage/Adminhtml/Block/Catalog/Form.php
#	app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Attributes.php
#	app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Price.php
#	app/code/core/Mage/Adminhtml/Block/Catalog/Search/Edit/Form.php
#	app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Account.php
#	app/code/core/Mage/Adminhtml/Block/Customer/Online/Grid/Renderer/Ip.php
#	app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Labels.php
#	app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Main.php
#	app/code/core/Mage/Adminhtml/Block/Report/Wishlist.php
#	app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Form/Abstract.php
#	app/code/core/Mage/Adminhtml/Block/Sales/Order/Status/New/Form.php
#	app/code/core/Mage/Adminhtml/Block/System/Email/Template/Grid/Renderer/Type.php
#	app/code/core/Mage/Adminhtml/Block/Widget/Form.php
#	app/code/core/Mage/Adminhtml/Block/Widget/Grid.php
#	app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Ip.php
#	app/code/core/Mage/Adminhtml/Controller/Action.php
#	app/code/core/Mage/Adminhtml/Model/Customer/Renderer/Region.php
#	app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Observer.php
#	app/code/core/Mage/Adminhtml/Model/System/Config/Backend/File.php
#	app/code/core/Mage/Adminhtml/Model/System/Config/Source/Date/Short.php
#	app/code/core/Mage/Adminhtml/controllers/AjaxController.php
#	app/code/core/Mage/Adminhtml/controllers/CustomerController.php
#	app/code/core/Mage/Adminhtml/controllers/System/Config/System/StorageController.php
#	app/code/core/Mage/Adminhtml/controllers/System/ConfigController.php
#	app/code/core/Mage/Adminhtml/controllers/Tax/RateController.php
#	app/code/core/Mage/Adminhtml/etc/config.xml
#	app/code/core/Mage/Api/Model/Server/Adapter/Soap.php
#	app/code/core/Mage/Api/Model/Server/Handler/Abstract.php
#	app/code/core/Mage/Api2/Model/Acl/Filter.php
#	app/code/core/Mage/Bundle/Model/Product/Type.php
#	app/code/core/Mage/Bundle/Model/Resource/Indexer/Price.php
#	app/code/core/Mage/Catalog/Block/Product/New.php
#	app/code/core/Mage/Catalog/Helper/Product/View.php
#	app/code/core/Mage/Catalog/Model/Api2/Product/Image/Rest/Admin/V1.php
#	app/code/core/Mage/Catalog/Model/Api2/Product/Rest/Admin/V1.php
#	app/code/core/Mage/Catalog/Model/Category/Attribute/Backend/Image.php
#	app/code/core/Mage/Catalog/Model/Product/Attribute/Media/Api.php
#	app/code/core/Mage/Catalog/Model/Product/Attribute/Tierprice/Api/V2.php
#	app/code/core/Mage/Catalog/Model/Product/Option/Type/File.php
#	app/code/core/Mage/Catalog/Model/Resource/Product/Attribute/Backend/Image.php
#	app/code/core/Mage/Catalog/Model/Resource/Product/Collection.php
#	app/code/core/Mage/Catalog/controllers/ProductController.php
#	app/code/core/Mage/CatalogRule/Model/Resource/Rule.php
#	app/code/core/Mage/CatalogSearch/Model/Resource/Fulltext.php
#	app/code/core/Mage/CatalogSearch/controllers/AdvancedController.php
#	app/code/core/Mage/Checkout/Block/Cart/Crosssell.php
#	app/code/core/Mage/Cms/Controller/Router.php
#	app/code/core/Mage/Cms/Model/Wysiwyg/Images/Storage.php
#	app/code/core/Mage/ConfigurableSwatches/Helper/Data.php
#	app/code/core/Mage/Core/Block/Abstract.php
#	app/code/core/Mage/Core/Block/Profiler.php
#	app/code/core/Mage/Core/Block/Text/Tag/Css/Admin.php
#	app/code/core/Mage/Core/Block/Text/Tag/Debug.php
#	app/code/core/Mage/Core/Controller/Front/Action.php
#	app/code/core/Mage/Core/Controller/Request/Http.php
#	app/code/core/Mage/Core/Controller/Response/Http.php
#	app/code/core/Mage/Core/Controller/Varien/Action.php
#	app/code/core/Mage/Core/Controller/Varien/Front.php
#	app/code/core/Mage/Core/Controller/Varien/Router/Admin.php
#	app/code/core/Mage/Core/Controller/Varien/Router/Standard.php
#	app/code/core/Mage/Core/Helper/Abstract.php
#	app/code/core/Mage/Core/Helper/Data.php
#	app/code/core/Mage/Core/Helper/Http.php
#	app/code/core/Mage/Core/Helper/String.php
#	app/code/core/Mage/Core/Model/App.php
#	app/code/core/Mage/Core/Model/Config.php
#	app/code/core/Mage/Core/Model/Config/Element.php
#	app/code/core/Mage/Core/Model/Config/Options.php
#	app/code/core/Mage/Core/Model/Cookie.php
#	app/code/core/Mage/Core/Model/Date.php
#	app/code/core/Mage/Core/Model/Design/Package.php
#	app/code/core/Mage/Core/Model/Email/Queue.php
#	app/code/core/Mage/Core/Model/File/Storage/Abstract.php
#	app/code/core/Mage/Core/Model/Input/Filter.php
#	app/code/core/Mage/Core/Model/Layout.php
#	app/code/core/Mage/Core/Model/Layout/Update.php
#	app/code/core/Mage/Core/Model/Locale.php
#	app/code/core/Mage/Core/Model/Resource/Abstract.php
#	app/code/core/Mage/Core/Model/Resource/File/Storage/File.php
#	app/code/core/Mage/Core/Model/Resource/Resource.php
#	app/code/core/Mage/Core/Model/Resource/Session.php
#	app/code/core/Mage/Core/Model/Session/Abstract.php
#	app/code/core/Mage/Core/Model/Session/Abstract/Varien.php
#	app/code/core/Mage/Core/Model/Store.php
#	app/code/core/Mage/Core/Model/Translate.php
#	app/code/core/Mage/Core/Model/Url.php
#	app/code/core/Mage/Core/Model/Url/Rewrite.php
#	app/code/core/Mage/Core/Model/Url/Rewrite/Request.php
#	app/code/core/Mage/Core/functions.php
#	app/code/core/Mage/Customer/Model/Address/Abstract.php
#	app/code/core/Mage/Customer/Model/Group.php
#	app/code/core/Mage/Dataflow/Model/Convert/Adapter/Http.php
#	app/code/core/Mage/Dataflow/Model/Convert/Iterator/Http.php
#	app/code/core/Mage/Dataflow/Model/Convert/Profile/Abstract.php
#	app/code/core/Mage/Dataflow/Model/Convert/Profile/Collection.php
#	app/code/core/Mage/Dataflow/Model/Profile.php
#	app/code/core/Mage/Dataflow/Model/Session/Adapter/Http.php
#	app/code/core/Mage/Directory/Model/Currency/Import/Abstract.php
#	app/code/core/Mage/Directory/Model/Currency/Import/Currencyconverterapi.php
#	app/code/core/Mage/Directory/Model/Currency/Import/Fixerio.php
#	app/code/core/Mage/Downloadable/Helper/Download.php
#	app/code/core/Mage/Downloadable/controllers/Adminhtml/Downloadable/Product/EditController.php
#	app/code/core/Mage/Downloadable/controllers/DownloadController.php
#	app/code/core/Mage/Eav/Model/Attribute/Data/File.php
#	app/code/core/Mage/Eav/Model/Attribute/Data/Image.php
#	app/code/core/Mage/Eav/Model/Attribute/Data/Text.php
#	app/code/core/Mage/Eav/Model/Entity/Attribute/Frontend/Abstract.php
#	app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php
#	app/code/core/Mage/ImportExport/Model/Import.php
#	app/code/core/Mage/ImportExport/Model/Import/Entity/Product.php
#	app/code/core/Mage/ImportExport/controllers/Adminhtml/ImportController.php
#	app/code/core/Mage/Install/Model/Installer/Console.php
#	app/code/core/Mage/Install/controllers/WizardController.php
#	app/code/core/Mage/Media/Model/File/Image.php
#	app/code/core/Mage/Oauth/Model/Observer.php
#	app/code/core/Mage/Page/Block/Template/Links.php
#	app/code/core/Mage/Paypal/Model/Ipn.php
#	app/code/core/Mage/Paypal/Model/Payflow/Request.php
#	app/code/core/Mage/Paypal/Model/Report/Settlement.php
#	app/code/core/Mage/Paypal/Model/System/Config/Backend/Cert.php
#	app/code/core/Mage/Paypal/controllers/IpnController.php
#	app/code/core/Mage/Paypal/controllers/StandardController.php
#	app/code/core/Mage/Rating/Model/Resource/Rating.php
#	app/code/core/Mage/Reports/Model/Resource/Report/Abstract.php
#	app/code/core/Mage/Reports/Model/Resource/Report/Collection.php
#	app/code/core/Mage/Rule/Model/Action/Abstract.php
#	app/code/core/Mage/Rule/Model/Action/Collection.php
#	app/code/core/Mage/Rule/Model/Condition/Abstract.php
#	app/code/core/Mage/Rule/Model/Condition/Combine.php
#	app/code/core/Mage/Sales/Block/Adminhtml/Recurring/Profile/Edit/Form.php
#	app/code/core/Mage/Sales/Model/Order/Pdf/Abstract.php
#	app/code/core/Mage/Sales/Model/Resource/Quote.php
#	app/code/core/Mage/Sales/Model/Resource/Report/Bestsellers.php
#	app/code/core/Mage/Sales/Model/Resource/Report/Invoiced.php
#	app/code/core/Mage/Sales/Model/Resource/Report/Order/Createdat.php
#	app/code/core/Mage/Sales/Model/Resource/Report/Shipping.php
#	app/code/core/Mage/Sales/controllers/DownloadController.php
#	app/code/core/Mage/SalesRule/Model/Observer.php
#	app/code/core/Mage/Shipping/Block/Tracking/Popup.php
#	app/code/core/Mage/Shipping/Model/Carrier/Tablerate.php
#	app/code/core/Mage/Shipping/Model/Resource/Carrier/Tablerate.php
#	app/code/core/Mage/Shipping/Model/Shipping.php
#	app/code/core/Mage/Tag/Model/Resource/Indexer/Summary.php
#	app/code/core/Mage/Tag/Model/Resource/Tag.php
#	app/code/core/Mage/Tax/Model/Resource/Report/Tax/Createdat.php
#	app/code/core/Mage/Uploader/Model/Config/Abstract.php
#	app/code/core/Mage/Usa/Model/Shipping/Carrier/Dhl/Label/Pdf/PageBuilder.php
#	app/code/core/Mage/Usa/Model/Shipping/Carrier/Ups.php
#	app/code/core/Mage/Weee/Model/Observer.php
#	app/code/core/Mage/Widget/Block/Adminhtml/Widget/Options.php
#	app/code/core/Mage/Wishlist/controllers/IndexController.php
#	app/design/adminhtml/default/default/template/api/role_users_grid_js.phtml
#	app/design/adminhtml/default/default/template/api/roleinfo.phtml
#	app/design/adminhtml/default/default/template/api/roles.phtml
#	app/design/adminhtml/default/default/template/api/rolesedit.phtml
#	app/design/adminhtml/default/default/template/api/rolesusers.phtml
#	app/design/adminhtml/default/default/template/api/user_roles_grid_js.phtml
#	app/design/adminhtml/default/default/template/api/userinfo.phtml
#	app/design/adminhtml/default/default/template/api/userroles.phtml
#	app/design/adminhtml/default/default/template/api/users.phtml
#	app/design/adminhtml/default/default/template/api2/attribute/resource.phtml
#	app/design/adminhtml/default/default/template/api2/permissions/user/edit/tab/roles/js.phtml
#	app/design/adminhtml/default/default/template/api2/role/users_grid_js.phtml
#	app/design/adminhtml/default/default/template/bundle/product/edit/bundle.phtml
#	app/design/adminhtml/default/default/template/bundle/product/edit/bundle/option.phtml
#	app/design/adminhtml/default/default/template/bundle/product/edit/bundle/option/search.phtml
#	app/design/adminhtml/default/default/template/bundle/product/edit/bundle/option/selection.phtml
#	app/design/adminhtml/default/default/template/captcha/zend.phtml
#	app/design/adminhtml/default/default/template/catalog/category/checkboxes/tree.phtml
#	app/design/adminhtml/default/default/template/catalog/category/widget/tree.phtml
#	app/design/adminhtml/default/default/template/catalog/product/attribute/new/created.phtml
#	app/design/adminhtml/default/default/template/catalog/product/attribute/set/toolbar/add.phtml
#	app/design/adminhtml/default/default/template/catalog/product/attribute/set/toolbar/main.phtml
#	app/design/adminhtml/default/default/template/catalog/product/created.phtml
#	app/design/adminhtml/default/default/template/catalog/product/edit/action/attribute.phtml
#	app/design/adminhtml/default/default/template/catalog/product/edit/action/inventory.phtml
#	app/design/adminhtml/default/default/template/catalog/product/edit/action/websites.phtml
#	app/design/adminhtml/default/default/template/catalog/product/edit/serializer.phtml
#	app/design/adminhtml/default/default/template/catalog/product/edit/super/config.phtml
#	app/design/adminhtml/default/default/template/catalog/product/tab/alert.phtml
#	app/design/adminhtml/default/default/template/catalog/wysiwyg/js.phtml
#	app/design/adminhtml/default/default/template/centinel/authentication/complete.phtml
#	app/design/adminhtml/default/default/template/centinel/authentication/start.phtml
#	app/design/adminhtml/default/default/template/centinel/validation/form.phtml
#	app/design/adminhtml/default/default/template/customer/online.phtml
#	app/design/adminhtml/default/default/template/customer/sales/order/create/address/form/renderer/vat.phtml
#	app/design/adminhtml/default/default/template/dashboard/graph.phtml
#	app/design/adminhtml/default/default/template/dashboard/graph/disabled.phtml
#	app/design/adminhtml/default/default/template/downloadable/product/edit/downloadable.phtml
#	app/design/adminhtml/default/default/template/downloadable/sales/order/creditmemo/create/items/renderer/downloadable.phtml
#	app/design/adminhtml/default/default/template/downloadable/sales/order/creditmemo/view/items/renderer/downloadable.phtml
#	app/design/adminhtml/default/default/template/downloadable/sales/order/invoice/create/items/renderer/downloadable.phtml
#	app/design/adminhtml/default/default/template/downloadable/sales/order/invoice/view/items/renderer/downloadable.phtml
#	app/design/adminhtml/default/default/template/downloadable/sales/order/view/items/renderer/downloadable.phtml
#	app/design/adminhtml/default/default/template/email/order/items.phtml
#	app/design/adminhtml/default/default/template/giftmessage/form.phtml
#	app/design/adminhtml/default/default/template/giftmessage/giftoptionsform.phtml
#	app/design/adminhtml/default/default/template/giftmessage/helper.phtml
#	app/design/adminhtml/default/default/template/giftmessage/popup.phtml
#	app/design/adminhtml/default/default/template/giftmessage/sales/order/create/giftoptions.phtml
#	app/design/adminhtml/default/default/template/giftmessage/sales/order/create/items.phtml
#	app/design/adminhtml/default/default/template/giftmessage/sales/order/view/giftoptions.phtml
#	app/design/adminhtml/default/default/template/giftmessage/sales/order/view/items.phtml
#	app/design/adminhtml/default/default/template/importexport/busy.phtml
#	app/design/adminhtml/default/default/template/importexport/export/form/after.phtml
#	app/design/adminhtml/default/default/template/importexport/export/form/before.phtml
#	app/design/adminhtml/default/default/template/importexport/import/form/after.phtml
#	app/design/adminhtml/default/default/template/importexport/import/form/before.phtml
#	app/design/adminhtml/default/default/template/importexport/import/frame/result.phtml
#	app/design/adminhtml/default/default/template/page/head.phtml
#	app/design/adminhtml/default/default/template/paygate/form/cc.phtml
#	app/design/adminhtml/default/default/template/paygate/info/cc.phtml
#	app/design/adminhtml/default/default/template/paygate/info/pdf.phtml
#	app/design/adminhtml/default/default/template/payment/form/banktransfer.phtml
#	app/design/adminhtml/default/default/template/payment/form/cc.phtml
#	app/design/adminhtml/default/default/template/payment/form/ccsave.phtml
#	app/design/adminhtml/default/default/template/payment/form/checkmo.phtml
#	app/design/adminhtml/default/default/template/payment/form/purchaseorder.phtml
#	app/design/adminhtml/default/default/template/payment/info/checkmo.phtml
#	app/design/adminhtml/default/default/template/payment/info/pdf/checkmo.phtml
#	app/design/adminhtml/default/default/template/payment/info/pdf/purchaseorder.phtml
#	app/design/adminhtml/default/default/template/payment/info/purchaseorder.phtml
#	app/design/adminhtml/default/default/template/permissions/userinfo.phtml
#	app/design/adminhtml/default/default/template/permissions/usernroles.phtml
#	app/design/adminhtml/default/default/template/permissions/userroles.phtml
#	app/design/adminhtml/default/default/template/permissions/users.phtml
#	app/design/adminhtml/default/default/template/report/grid.phtml
#	app/design/adminhtml/default/default/template/report/wishlist.phtml
#	app/design/adminhtml/default/default/template/sales/billing/agreement/view/tab/info.phtml
#	app/design/adminhtml/default/default/template/sales/items/column/name.phtml
#	app/design/adminhtml/default/default/template/sales/items/column/qty.phtml
#	app/design/adminhtml/default/default/template/sales/order/address/form.phtml
#	app/design/adminhtml/default/default/template/sales/order/create/totals/default.phtml
#	app/design/adminhtml/default/default/template/sales/order/shipment/create/items/renderer/default.phtml
#	app/design/adminhtml/default/default/template/sales/order/shipment/packaging/grid.phtml
#	app/design/adminhtml/default/default/template/sales/order/shipment/tracking/info.phtml
#	app/design/adminhtml/default/default/template/sales/transactions/detail.phtml
#	app/design/adminhtml/default/default/template/store/switcher/form/renderer/fieldset.phtml
#	app/design/adminhtml/default/default/template/system/autocomplete.phtml
#	app/design/adminhtml/default/default/template/system/cache/edit.phtml
#	app/design/adminhtml/default/default/template/system/config/form/field/array.phtml
#	app/design/adminhtml/default/default/template/system/convert/profile/process.phtml
#	app/design/adminhtml/default/default/template/system/convert/profile/run.phtml
#	app/design/adminhtml/default/default/template/system/store/cell.phtml
#	app/design/adminhtml/default/default/template/system/store/container.phtml
#	app/design/adminhtml/default/default/template/system/store/tree.phtml
#	app/design/adminhtml/default/default/template/weee/renderer/tax.phtml
#	app/design/adminhtml/default/default/template/widget/breadcrumbs.phtml
#	app/design/adminhtml/default/default/template/widget/form/element.phtml
#	app/design/adminhtml/default/default/template/widget/form/element/gallery.phtml
#	app/design/adminhtml/default/default/template/widget/grid/serializer.phtml
#	app/design/adminhtml/default/default/template/widget/view/container.phtml
#	app/design/frontend/base/default/template/bundle/catalog/product/view/price.phtml
#	app/design/frontend/base/default/template/bundle/catalog/product/view/type/bundle.phtml
#	app/design/frontend/base/default/template/bundle/catalog/product/view/type/bundle/options.phtml
#	app/design/frontend/base/default/template/bundle/sales/order/creditmemo/items/renderer.phtml
#	app/design/frontend/base/default/template/bundle/sales/order/invoice/items/renderer.phtml
#	app/design/frontend/base/default/template/callouts/left_col.phtml
#	app/design/frontend/base/default/template/callouts/right_col.phtml
#	app/design/frontend/base/default/template/catalog/product/gallery.phtml
#	app/design/frontend/base/default/template/catalog/product/new.phtml
#	app/design/frontend/base/default/template/catalog/product/view/additional.phtml
#	app/design/frontend/base/default/template/catalog/product/view/options/wrapper.phtml
#	app/design/frontend/base/default/template/catalog/product/view/options/wrapper/bottom.phtml
#	app/design/frontend/base/default/template/catalog/product/view/price_clone.phtml
#	app/design/frontend/base/default/template/catalog/product/view/type/options/configurable.phtml
#	app/design/frontend/base/default/template/centinel/authentication.phtml
#	app/design/frontend/base/default/template/centinel/authentication/complete.phtml
#	app/design/frontend/base/default/template/centinel/authentication/start.phtml
#	app/design/frontend/base/default/template/centinel/logo.phtml
#	app/design/frontend/base/default/template/checkout/cart/item/configure/updatecart.phtml
#	app/design/frontend/base/default/template/checkout/cart/item/default.phtml
#	app/design/frontend/base/default/template/checkout/cart/noItems.phtml
#	app/design/frontend/base/default/template/checkout/multishipping/address/select.phtml
#	app/design/frontend/base/default/template/checkout/multishipping/billing/items.phtml
#	app/design/frontend/base/default/template/checkout/multishipping/link.phtml
#	app/design/frontend/base/default/template/checkout/multishipping/success.phtml
#	app/design/frontend/base/default/template/checkout/onepage/failure.phtml
#	app/design/frontend/base/default/template/checkout/onepage/login.phtml
#	app/design/frontend/base/default/template/checkout/onepage/progress/payment.phtml
#	app/design/frontend/base/default/template/checkout/onepage/progress/shipping.phtml
#	app/design/frontend/base/default/template/checkout/onepage/progress/shipping_method.phtml
#	app/design/frontend/base/default/template/checkout/total/default.phtml
#	app/design/frontend/base/default/template/checkout/total/tax.phtml
#	app/design/frontend/base/default/template/core/link.phtml
#	app/design/frontend/base/default/template/customer/account/dashboard/newsletter.phtml
#	app/design/frontend/base/default/template/customer/form/confirmation.phtml
#	app/design/frontend/base/default/template/customer/form/newsletter.phtml
#	app/design/frontend/base/default/template/customer/form/resetforgottenpassword.phtml
#	app/design/frontend/base/default/template/customer/logout.phtml
#	app/design/frontend/base/default/template/customer/widget/gender.phtml
#	app/design/frontend/base/default/template/customer/widget/taxvat.phtml
#	app/design/frontend/base/default/template/downloadable/checkout/cart/item/default.phtml
#	app/design/frontend/base/default/template/downloadable/checkout/multishipping/item/downloadable.phtml
#	app/design/frontend/base/default/template/downloadable/checkout/onepage/review/item.phtml
#	app/design/frontend/base/default/template/downloadable/checkout/success.phtml
#	app/design/frontend/base/default/template/downloadable/email/order/items/creditmemo/downloadable.phtml
#	app/design/frontend/base/default/template/downloadable/email/order/items/invoice/downloadable.phtml
#	app/design/frontend/base/default/template/downloadable/email/order/items/order/downloadable.phtml
#	app/design/frontend/base/default/template/email/order/creditmemo/items.phtml
#	app/design/frontend/base/default/template/email/order/invoice/items.phtml
#	app/design/frontend/base/default/template/email/order/shipment/items.phtml
#	app/design/frontend/base/default/template/email/order/shipment/track.phtml
#	app/design/frontend/base/default/template/giftmessage/inline.phtml
#	app/design/frontend/base/default/template/page/html/cookienotice.phtml
#	app/design/frontend/base/default/template/page/html/top.links.phtml
#	app/design/frontend/base/default/template/page/html/wrapper.phtml
#	app/design/frontend/base/default/template/paygate/form/cc.phtml
#	app/design/frontend/base/default/template/paygate/info/cc.phtml
#	app/design/frontend/base/default/template/payment/form/banktransfer.phtml
#	app/design/frontend/base/default/template/payment/form/cc.phtml
#	app/design/frontend/base/default/template/payment/form/ccsave.phtml
#	app/design/frontend/base/default/template/payment/form/checkmo.phtml
#	app/design/frontend/base/default/template/payment/form/purchaseorder.phtml
#	app/design/frontend/base/default/template/payment/info/banktransfer.phtml
#	app/design/frontend/base/default/template/payment/info/checkmo.phtml
#	app/design/frontend/base/default/template/payment/info/default.phtml
#	app/design/frontend/base/default/template/payment/info/purchaseorder.phtml
#	app/design/frontend/base/default/template/paypal/hss/iframe.phtml
#	app/design/frontend/base/default/template/rating/detailed.phtml
#	app/design/frontend/base/default/template/rating/empty.phtml
#	app/design/frontend/base/default/template/review/customer/list.phtml
#	app/design/frontend/base/default/template/review/customer/recent.phtml
#	app/design/frontend/base/default/template/review/customer/view.phtml
#	app/design/frontend/base/default/template/review/form.phtml
#	app/design/frontend/base/default/template/review/helper/summary.phtml
#	app/design/frontend/base/default/template/review/helper/summary_short.phtml
#	app/design/frontend/base/default/template/review/product/view/count.phtml
#	app/design/frontend/base/default/template/review/product/view/list.phtml
#	app/design/frontend/base/default/template/review/product/view/other.phtml
#	app/design/frontend/base/default/template/review/view.phtml
#	app/design/frontend/base/default/template/rss/list.phtml
#	app/design/frontend/base/default/template/sales/guest/form.phtml
#	app/design/frontend/base/default/template/sales/order/creditmemo/items.phtml
#	app/design/frontend/base/default/template/sales/order/details.phtml
#	app/design/frontend/base/default/template/sales/order/history.phtml
#	app/design/frontend/base/default/template/sales/order/info/buttons.phtml
#	app/design/frontend/base/default/template/sales/order/invoice/items.phtml
#	app/design/frontend/base/default/template/sales/order/print.phtml
#	app/design/frontend/base/default/template/sales/order/print/creditmemo.phtml
#	app/design/frontend/base/default/template/sales/order/print/invoice.phtml
#	app/design/frontend/base/default/template/sales/order/recent.phtml
#	app/design/frontend/base/default/template/sales/order/shipment/items.phtml
#	app/design/frontend/base/default/template/sales/order/trackinginfo.phtml
#	app/design/frontend/base/default/template/tax/order/tax.phtml
#	app/design/frontend/base/default/template/wishlist/email/rss.phtml
#	app/design/frontend/base/default/template/wishlist/item/column/remove.phtml
#	app/design/frontend/base/default/template/wishlist/item/configure/addto.phtml
#	app/design/frontend/base/default/template/wishlist/item/list.phtml
#	app/design/frontend/base/default/template/wishlist/sharing.phtml
#	app/design/frontend/rwd/default/template/bundle/catalog/product/view/type/bundle.phtml
#	app/design/frontend/rwd/default/template/bundle/catalog/product/view/type/bundle/availability.phtml
#	app/design/frontend/rwd/default/template/catalog/product/view/type/availability/grouped.phtml
#	app/design/frontend/rwd/default/template/catalog/product/view/type/options/configurable.phtml
#	app/design/frontend/rwd/default/template/centinel/authentication/start.phtml
#	app/design/frontend/rwd/default/template/checkout/cart/item/configure/updatecart.phtml
#	app/design/frontend/rwd/default/template/configurableswatches/catalog/layer/state/swatch.phtml
#	app/design/frontend/rwd/default/template/customer/form/confirmation.phtml
#	app/design/frontend/rwd/default/template/customer/form/resetforgottenpassword.phtml
#	app/design/frontend/rwd/default/template/downloadable/checkout/onepage/review/item.phtml
#	app/design/frontend/rwd/default/template/downloadable/email/order/items/creditmemo/downloadable.phtml
#	app/design/frontend/rwd/default/template/downloadable/email/order/items/invoice/downloadable.phtml
#	app/design/frontend/rwd/default/template/downloadable/email/order/items/order/downloadable.phtml
#	app/design/frontend/rwd/default/template/email/catalog/product/new.phtml
#	app/design/frontend/rwd/default/template/email/order/creditmemo/items.phtml
#	app/design/frontend/rwd/default/template/email/order/invoice/items.phtml
#	app/design/frontend/rwd/default/template/email/order/shipment/items.phtml
#	app/design/frontend/rwd/default/template/email/order/shipment/track.phtml
#	app/design/frontend/rwd/default/template/email/order/totals/wrapper.phtml
#	app/design/frontend/rwd/default/template/payment/form/cc.phtml
#	app/design/frontend/rwd/default/template/payment/form/ccsave.phtml
#	app/design/frontend/rwd/default/template/rating/detailed.phtml
#	app/design/frontend/rwd/default/template/review/customer/view.phtml
#	app/design/frontend/rwd/default/template/review/form.phtml
#	app/design/frontend/rwd/default/template/review/product/view/list.phtml
#	app/design/frontend/rwd/default/template/review/view.phtml
#	app/design/frontend/rwd/default/template/sales/order/creditmemo/items.phtml
#	app/design/frontend/rwd/default/template/sales/order/history.phtml
#	app/design/frontend/rwd/default/template/sales/order/invoice/items.phtml
#	app/design/frontend/rwd/default/template/sales/order/recent.phtml
#	app/design/frontend/rwd/default/template/sales/order/shipment/items.phtml
#	app/design/install/default/default/template/install/state.phtml
#	get.php
#	lib/Mage/Archive/Abstract.php
#	lib/Mage/Archive/Helper/File.php
#	lib/Mage/Archive/Helper/File/Bz.php
#	lib/Mage/Archive/Helper/File/Gz.php
#	lib/Mage/Archive/Tar.php
#	lib/Mage/Cache/Backend/File.php
#	lib/Mage/DB/Mysqli.php
#	lib/Mage/HTTP/Client/Socket.php
#	lib/Mage/System/Dirs.php
#	lib/Mage/System/Ftp.php
#	lib/Unserialize/Parser.php
#	lib/Unserialize/Reader/Arr.php
#	lib/Unserialize/Reader/ArrKey.php
#	lib/Unserialize/Reader/ArrValue.php
#	lib/Unserialize/Reader/Bool.php
#	lib/Unserialize/Reader/Dbl.php
#	lib/Unserialize/Reader/Int.php
#	lib/Unserialize/Reader/Null.php
#	lib/Unserialize/Reader/Str.php
#	lib/Varien/Db/Adapter/Mysqli.php
#	lib/Varien/File/Uploader.php
#	lib/Varien/Image/Adapter/Abstract.php
#	lib/Varien/Image/Adapter/Gd2.php
#	lib/Varien/Io/File.php
#	lib/Varien/Io/Ftp.php
#	lib/Varien/Simplexml/Config.php
#	lib/Varien/Simplexml/Config/Cache/File.php
#	shell/indexer.php
# Conflicts:
#	tests/unit/Mage/Catalog/Model/CategoryTest.php
#	tests/unit/Mage/Catalog/Model/ProductTest.php
#	tests/unit/Mage/Catalog/Model/UrlTest.php
#	tests/unit/Mage/Cms/Block/BlockTest.php
#	tests/unit/Mage/Cms/Block/PageTest.php
#	tests/unit/Mage/Cms/Block/Widget/BlockTest.php
#	tests/unit/Mage/Directory/Helper/DataTest.php
#	tests/unit/Mage/Downloadable/Helper/FileTest.php
#	tests/unit/Mage/Tax/Helper/DataTest.php
#	tests/unit/Mage/Uploader/Helper/FileTest.php
- phpdoc -c .phpdoc.dist.xml
@github-actions github-actions bot added environment Component: Core Relates to Mage_Core Component: Catalog Relates to Mage_Catalog Component: Cms Relates to Mage_Cms Component: CatalogInventory Relates to Mage_CatalogInventory Component: Checkout Relates to Mage_Checkout labels Feb 10, 2025
@github-actions github-actions bot added Component: Bundle Relates to Mage_Bundle Component: CatalogIndex Relates to Mage_CatalogIndex Component: Api2 Relates to Mage_Api2 Component: Directory Relates to Mage_Directory Component: ConfigurableSwatches Relates to Mage_ConfigurableSwatches Component: CatalogSearch Relates to Mage_CatalogSearch Component: Authorizenet Relates to Mage_Authorizenet Component: Centinel Relates to Mage_Centinel Component: Dataflow Relates to Mage_Dataflow PHPStorm git labels Feb 10, 2025
@sreichel
Copy link
Contributor

WOW. 🚀

@colinmollenhour colinmollenhour changed the title Shorter copyright header Draft: Shorter copyright header Feb 10, 2025
@colinmollenhour colinmollenhour marked this pull request as draft February 10, 2025 18:12
@sreichel
Copy link
Contributor

sreichel commented Feb 10, 2025

Looks good, only ...

  • line endings changed?
  • category-tag could be removed (edit: already done?)
  • add tabs/spaces for aligmnent in docs

@colinmollenhour
Copy link
Member Author

I pushed some more fixes - there are still a handful of cases that need to be updated (e.g. search for @category) but I need to do some other things today..

@sreichel
Copy link
Contributor

but I need to do some other things today..

😄

Looks good so far. Thanks. Phpstan has to be checked ;(

@sonarqubecloud
Copy link

@sreichel
Copy link
Contributor

sreichel commented Feb 10, 2025

Seems you have erased some other at-tags too.

  • dataprovider in tests
  • group in tests
  • ...

A small changes went into work .... ;)

Finally ... this should either be adde th shell or better dev.

# Conflicts:
#	.github/workflows/update-copyright.yml
#	app/Mage.php
#	app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Inventory.php
#	app/code/core/Mage/Adminhtml/Block/Dashboard.php
#	app/code/core/Mage/Adminhtml/Block/Dashboard/Graph.php
#	app/code/core/Mage/Adminhtml/Block/Dashboard/Tab/Amounts.php
#	app/code/core/Mage/Adminhtml/Block/Dashboard/Tab/Orders.php
#	app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Number.php
#	app/code/core/Mage/Adminhtml/Helper/Dashboard/Data.php
#	app/code/core/Mage/Adminhtml/controllers/DashboardController.php
#	app/code/core/Mage/Api2/Model/Resource.php
#	app/code/core/Mage/Catalog/Model/Api2/Product/Rest.php
#	app/code/core/Mage/Catalog/Model/Layer.php
#	app/code/core/Mage/Cms/Model/Wysiwyg/Config.php
#	app/code/core/Mage/Contacts/controllers/IndexController.php
#	app/code/core/Mage/Contacts/etc/config.xml
#	app/code/core/Mage/Contacts/etc/system.xml
#	app/code/core/Mage/Core/Helper/UnserializeArray.php
#	app/code/core/Mage/Core/etc/system.xml
#	app/code/core/Mage/Index/Model/Process.php
#	app/code/core/Mage/Install/Model/Installer.php
#	app/code/core/Mage/Reports/Helper/Data.php
#	app/code/core/Mage/Reports/Model/Resource/Order/Collection.php
#	app/code/core/Mage/Reports/Model/Resource/Report/Collection/Abstract.php
#	app/code/core/Mage/Reports/Model/Resource/Report/Product/Viewed/Collection.php
#	app/code/core/Mage/Sales/Model/Resource/Report/Bestsellers/Collection.php
#	app/code/core/Mage/Sitemap/Model/Observer.php
#	app/design/adminhtml/default/default/template/catalog/product/tab/inventory.phtml
#	app/design/adminhtml/default/default/template/dashboard/graph.phtml
#	app/design/adminhtml/default/default/template/oauth/authorize/head-simple.phtml
#	app/design/frontend/base/default/template/contacts/form.phtml
#	app/design/frontend/rwd/default/template/contacts/form.phtml
#	composer.lock
#	errors/processor.php
#	lib/3Dsecure/CentinelClient.php
#	lib/Varien/Object.php
@sonarqubecloud
Copy link

@sreichel
Copy link
Contributor

sreichel commented May 6, 2025

... followed-up by #4767

@sreichel sreichel closed this May 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Component: Admin Relates to Mage_Admin Component: Adminhtml Relates to Mage_Adminhtml Component: AdminNotification Relates to Mage_AdminNotification Component: Api PageRelates to Mage_Api Component: Api2 Relates to Mage_Api2 Component: Authorizenet Relates to Mage_Authorizenet Component: Bundle Relates to Mage_Bundle Component: Captcha Relates to Mage_Captcha Component: Catalog Relates to Mage_Catalog Component: CatalogIndex Relates to Mage_CatalogIndex Component: CatalogInventory Relates to Mage_CatalogInventory Component: CatalogRule Relates to Mage_CatalogRule Component: CatalogSearch Relates to Mage_CatalogSearch Component: Centinel Relates to Mage_Centinel Component: Checkout Relates to Mage_Checkout Component: Cms Relates to Mage_Cms Component: ConfigurableSwatches Relates to Mage_ConfigurableSwatches Component: Contacts Relates to Mage_Contacts Component: Core Relates to Mage_Core Component: Cron Relates to Mage_Cron Component: CurrencySymbol Relates to Mage_CurrencySymbol Component: Customer Relates to Mage_Customer Component: Dataflow Relates to Mage_Dataflow Component: Directory Relates to Mage_Directory Component: Downloadable Relates to Mage_Downloadable environment git Mage.php Relates to app/Mage.php PHPStorm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants