Skip to content

New, autoloader-centric file structure #348

@szepeviktor

Description

@szepeviktor

Aka. for machines only

repo/
├─ generated/
│  ├─ src/
│  ├─ functions.php
  • all classes go (generated or copied) in src directory as per PSR-4
  • all functions go (generated or copied) into functions.php file
  • keep generated/functionsList.php
  • deprecated things get a PHPDoc tag
/**
 * @deprecated Reason, date, version ...
 */

Resulting Composer config.

    "autoload": {
        "psr-4": {
            "Safe\\": [
                "generated/src/"
            ]
        },
        "files": [
            "generated/functions.php"
        ]
    },

All other directories could be excluded from distribution.

Would you support a PR that modifies the generator?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions