[
  {
    "path": ".editorconfig",
    "content": "root = true\n\n[*]\ncharset = utf-8\nend_of_line = lf\ninsert_final_newline = true\nindent_style = space\nindent_size = 4\ntrim_trailing_whitespace = true\n\n[*.md]\ntrim_trailing_whitespace = false\n\n[*.{yml,yaml}]\nindent_size = 2\n"
  },
  {
    "path": ".gitattributes",
    "content": "* text=auto\n\n*.blade.php diff=html\n*.css diff=css\n*.html diff=html\n*.md diff=markdown\n*.php diff=php\n\n/.github export-ignore\n/art export-ignore\n/tests export-ignore\n.editorconfig export-ignore\n.gitattributes export-ignore\n.gitignore export-ignore\n.styleci.yml export-ignore\nCHANGELOG.md export-ignore\nphpstan.neon.dist export-ignore\nphpunit.xml.dist export-ignore\n"
  },
  {
    "path": ".github/CODE_OF_CONDUCT.md",
    "content": "# Code of Conduct\n\nThe Laravel Code of Conduct can be found in the [Laravel documentation](https://laravel.com/docs/contributions#code-of-conduct).\n"
  },
  {
    "path": ".github/CONTRIBUTING.md",
    "content": "# Contribution Guide\n\nThe Laravel contributing guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions).\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/1_Bug_report.yml",
    "content": "name: Bug Report\ndescription: \"Report something that's broken.\"\nbody:\n  - type: markdown\n    attributes:\n      value: \"Please read [our full contribution guide](https://laravel.com/docs/contributions#bug-reports) before submitting bug reports. If you notice improper DocBlock, PHPStan, or IDE warnings while using Laravel, do not create a GitHub issue. Instead, please submit a pull request to fix the problem.\"\n  - type: input\n    attributes:\n      label: Tinker Version\n      description: Provide the Tinker version that you are using.\n      placeholder: 1.6.1\n    validations:\n      required: true\n  - type: input\n    attributes:\n      label: Laravel Version\n      description: Provide the Laravel version that you are using. [Please ensure it is still supported.](https://laravel.com/docs/releases#support-policy)\n      placeholder: 10.4.1\n    validations:\n      required: true\n  - type: input\n    attributes:\n      label: PHP Version\n      description: Provide the PHP version that you are using.\n      placeholder: 8.1.4\n    validations:\n      required: true\n  - type: input\n    attributes:\n      label: Database Driver & Version\n      description: If applicable, provide the database driver and version you are using.\n      placeholder: \"MySQL 8.0.31 for macOS 13.0 on arm64 (Homebrew)\"\n    validations:\n      required: false\n  - type: textarea\n    attributes:\n      label: Description\n      description: Provide a detailed description of the issue you are facing.\n    validations:\n      required: true\n  - type: textarea\n    attributes:\n      label: Steps To Reproduce\n      description: Provide detailed steps to reproduce your issue. If necessary, please provide a GitHub repository to demonstrate your issue using `laravel new bug-report --github=\"--public\"`.\n    validations:\n      required: true\n      \n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/config.yml",
    "content": "blank_issues_enabled: false\ncontact_links:\n  - name: Feature request\n    url: https://github.com/laravel/tinker/pulls\n    about: 'For ideas or feature requests, send in a pull request'\n  - name: Support Questions & Other\n    url: https://laravel.com/docs/contributions#support-questions\n    about: 'This repository is only for reporting bugs. If you have a question or need help using the library, click:'\n  - name: Documentation issue\n    url: https://github.com/laravel/docs\n    about: For documentation issues, open a pull request at the laravel/docs repository\n"
  },
  {
    "path": ".github/PULL_REQUEST_TEMPLATE.md",
    "content": "<!--\nPlease only send a pull request to branches which are currently supported: https://laravel.com/docs/releases#support-policy \n\nIf you are unsure which branch your pull request should be sent to, please read: https://laravel.com/docs/contributions#which-branch\n\nPull requests without a descriptive title, thorough description, or tests will be closed.\n\nIn addition, please describe the benefit to end users; the reasons it does not break any existing features; how it makes building web applications easier, etc.\n-->\n"
  },
  {
    "path": ".github/SECURITY.md",
    "content": "# Security Policy\n\n**PLEASE DON'T DISCLOSE SECURITY-RELATED ISSUES PUBLICLY, [SEE BELOW](#reporting-a-vulnerability).**\n\n## Supported Versions\n\nOnly the latest major version receives security fixes.\n\n## Reporting a Vulnerability\n\nIf you discover a security vulnerability within Laravel, please send an email to Taylor Otwell at taylor@laravel.com. All security vulnerabilities will be promptly addressed.\n\n### Public PGP Key\n\n```\n-----BEGIN PGP PUBLIC KEY BLOCK-----\nVersion: OpenPGP v2.0.8\nComment: Report Security Vulnerabilities to taylor@laravel.com\n\nxsF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BKlcpf1wD5X9qCrl9vq19asVOHaKhiFZGxZIVbBpBOdvAKaMj4p/uln\nyklN3YFIfgmGPYbL0elvXVn7XfvwSV1mCQV5LtMbLHsFf0VsA16UsG8A/tLWtwgt\n0antzftRHXb+DI4qr+qEYKFkv9F3oCOXyH4QBhPA42EzKqhMXByEkEK9bu6skioL\nmHhDQ7yHjTWcxstqQjkUQ0T/IF9ls+Sm5u7rVXEifpyI7MCb+76kSCDawesvInKt\nWBGOG/qJGDlNiqBYYt2xNqzHCJoC\n=zXOv\n-----END PGP PUBLIC KEY BLOCK-----\n```\n"
  },
  {
    "path": ".github/SUPPORT.md",
    "content": "# Support Questions\n\nThe Laravel support guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions#support-questions).\n"
  },
  {
    "path": ".github/workflows/issues.yml",
    "content": "name: issues\n\non:\n  issues:\n    types: [labeled]\n\npermissions:\n  issues: write\n\njobs:\n  help-wanted:\n    uses: laravel/.github/.github/workflows/issues.yml@main\n"
  },
  {
    "path": ".github/workflows/pull-requests.yml",
    "content": "name: pull requests\n\non:\n  pull_request_target:\n    types: [opened]\n\npermissions:\n  pull-requests: write\n\njobs:\n  uneditable:\n    uses: laravel/.github/.github/workflows/pull-requests.yml@main\n"
  },
  {
    "path": ".github/workflows/static-analysis.yml",
    "content": "name: static analysis\n\non:\n  push:\n    branches:\n      - master\n      - '*.x'\n  pull_request:\n\npermissions:\n  contents: read\n\njobs:\n  tests:\n    uses: laravel/.github/.github/workflows/static-analysis.yml@main\n"
  },
  {
    "path": ".github/workflows/tests.yml",
    "content": "name: tests\n\non:\n  push:\n    branches:\n      - master\n      - '*.x'\n  pull_request:\n  schedule:\n    - cron: '0 0 * * *'\n\njobs:\n  tests:\n    runs-on: ubuntu-22.04\n\n    strategy:\n      fail-fast: true\n      matrix:\n        php: [7.2, 7.3, 7.4, '8.0', 8.1, 8.2, 8.3]\n        laravel: [6, 7, 8, 9, 10, 11, 12]\n        include:\n          - php: 8.4\n            laravel: 11\n          - php: 8.4\n            laravel: 12\n          - php: 8.5\n            laravel: 12\n        exclude:\n          - php: 7.2\n            laravel: 8\n          - php: 7.2\n            laravel: 9\n          - php: 7.2\n            laravel: 10\n          - php: 7.2\n            laravel: 11\n          - php: 7.2\n            laravel: 12\n          - php: 7.3\n            laravel: 9\n          - php: 7.3\n            laravel: 10\n          - php: 7.3\n            laravel: 11\n          - php: 7.3\n            laravel: 12\n          - php: 7.4\n            laravel: 9\n          - php: 7.4\n            laravel: 10\n          - php: 7.4\n            laravel: 11\n          - php: 7.4\n            laravel: 12\n          - php: '8.0'\n            laravel: 10\n          - php: '8.0'\n            laravel: 11\n          - php: '8.0'\n            laravel: 12\n          - php: 8.1\n            laravel: 6\n          - php: 8.1\n            laravel: 7\n          - php: 8.1\n            laravel: 11\n          - php: 8.1\n            laravel: 12\n          - php: 8.2\n            laravel: 6\n          - php: 8.2\n            laravel: 7\n          - php: 8.2\n            laravel: 8\n          - php: 8.3\n            laravel: 6\n          - php: 8.3\n            laravel: 7\n          - php: 8.3\n            laravel: 8\n          - php: 8.3\n            laravel: 9\n\n    name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }}\n\n    steps:\n      - name: Checkout code\n        uses: actions/checkout@v4\n\n      - name: Setup PHP\n        uses: shivammathur/setup-php@v2\n        with:\n          php-version: ${{ matrix.php }}\n          extensions: dom, curl, libxml, mbstring, zip\n          ini-values: error_reporting=E_ALL\n          tools: composer:v2\n          coverage: none\n\n      - name: Install dependencies\n        run: |\n          composer update --prefer-dist --no-interaction --no-progress --with=\"illuminate/contracts=^${{ matrix.laravel }}\"\n\n      - name: Execute tests\n        run: vendor/bin/phpunit\n"
  },
  {
    "path": ".github/workflows/update-changelog.yml",
    "content": "name: update changelog\n\non:\n  release:\n    types: [released]\n\npermissions: {}\n\njobs:\n  update:\n    permissions:\n      contents: write\n    uses: laravel/.github/.github/workflows/update-changelog.yml@main\n"
  },
  {
    "path": ".gitignore",
    "content": "/vendor\ncomposer.lock\n/phpunit.xml\n.phpunit.result.cache\n"
  },
  {
    "path": ".styleci.yml",
    "content": "php:\n  preset: laravel\njs: true\ncss: true\n"
  },
  {
    "path": "CHANGELOG.md",
    "content": "# Release Notes\n\n## [Unreleased](https://github.com/laravel/tinker/compare/v2.11.1...2.x)\n\n## [v2.11.1](https://github.com/laravel/tinker/compare/v2.11.0...v2.11.1) - 2026-02-06\n\n* Avoid trust project prompts from PsySH by [@WendellAdriel](https://github.com/WendellAdriel) in https://github.com/laravel/tinker/pull/198\n\n## [v2.11.0](https://github.com/laravel/tinker/compare/v2.10.2...v2.11.0) - 2025-12-19\n\n* perf: optimize ClassAliasAutoloader using contains() by [@Ayoub-Mabrouk](https://github.com/Ayoub-Mabrouk) in https://github.com/laravel/tinker/pull/194\n* Allow Symfony v8 by [@jnoordsij](https://github.com/jnoordsij) in https://github.com/laravel/tinker/pull/195\n\n## [v2.10.2](https://github.com/laravel/tinker/compare/v2.10.1...v2.10.2) - 2025-11-20\n\n* [2.x] PHP 8.5 Compatibility by [@crynobone](https://github.com/crynobone) in https://github.com/laravel/tinker/pull/192\n\n## [v2.10.1](https://github.com/laravel/tinker/compare/v2.10.0...v2.10.1) - 2025-01-27\n\n* Update logo to support dark/light theme by [@milewski](https://github.com/milewski) in https://github.com/laravel/tinker/pull/183\n* [2.x] Supports Laravel 12 by [@crynobone](https://github.com/crynobone) in https://github.com/laravel/tinker/pull/185\n\n## [v2.10.0](https://github.com/laravel/tinker/compare/v2.9.0...v2.10.0) - 2024-09-23\n\n* Use actions/checkout[@v4](https://github.com/v4) by [@Jubeki](https://github.com/Jubeki) in https://github.com/laravel/tinker/pull/172\n* Use new static analysis workflow by [@Jubeki](https://github.com/Jubeki) in https://github.com/laravel/tinker/pull/173\n* Replace dead link in Security Policy by [@Jubeki](https://github.com/Jubeki) in https://github.com/laravel/tinker/pull/180\n* [2.x] Supports PHP 8.4 by [@crynobone](https://github.com/crynobone) in https://github.com/laravel/tinker/pull/182\n\n## [v2.9.0](https://github.com/laravel/tinker/compare/v2.8.2...v2.9.0) - 2024-01-04\n\n* Update PsySH dependency to v0.12 by [@bobthecow](https://github.com/bobthecow) in https://github.com/laravel/tinker/pull/170\n* [2.x] Merging develop by [@nunomaduro](https://github.com/nunomaduro) in https://github.com/laravel/tinker/pull/171\n\n## [v2.8.2](https://github.com/laravel/tinker/compare/v2.8.1...v2.8.2) - 2023-08-15\n\n- [2.x] Adds type checking by [@nunomaduro](https://github.com/nunomaduro) in https://github.com/laravel/tinker/pull/160\n- [2.x] Remove unused `orchestra/testbench` deps by [@crynobone](https://github.com/crynobone) in https://github.com/laravel/tinker/pull/166\n\n## [v2.8.1](https://github.com/laravel/tinker/compare/v2.8.0...v2.8.1) - 2023-02-15\n\n- Cast ProcessResult objects by @mpociot in https://github.com/laravel/tinker/pull/159\n\n## [v2.8.0](https://github.com/laravel/tinker/compare/v2.7.3...v2.8.0) - 2023-01-10\n\n### Added\n\n- Laravel v10 support\n\n## [v2.7.3](https://github.com/laravel/tinker/compare/v2.7.2...v2.7.3) - 2022-11-09\n\n### Changed\n\n- Set raw output when using `--execute` by @innocenzi in https://github.com/laravel/tinker/pull/155\n\n## [v2.7.2](https://github.com/laravel/tinker/compare/v2.7.1...v2.7.2) - 2022-03-23\n\n### Fixed\n\n- Add Laravel app instance to command by @driesvints in https://github.com/laravel/tinker/pull/146\n\n## [v2.7.1](https://github.com/laravel/tinker/compare/v2.7.0...v2.7.1) - 2022-03-15\n\n### Fixed\n\n- Fix command resolving by @driesvints in https://github.com/laravel/tinker/pull/144 and https://github.com/laravel/tinker/commit/1e2d500585a4e546346fadd3adc6f9c1a97e15f4\n\n## [v2.7.0 (2022-01-12)](https://github.com/laravel/tinker/compare/v2.6.3...v2.7.0)\n\n### Changed\n\n- Laravel 9 and psych v0.11.x support ([#139](https://github.com/laravel/tinker/pull/139))\n\n## [v2.6.3 (2021-12-07)](https://github.com/laravel/tinker/compare/v2.6.2...v2.6.3)\n\n### Changed\n\n- Add `migrate:install` to whitelisted commands ([#137](https://github.com/laravel/tinker/pull/137))\n\n## [v2.6.2 (2021-09-28)](https://github.com/laravel/tinker/compare/v2.6.1...v2.6.2)\n\n### Added\n\n- Added custom caster support ([#133](https://github.com/laravel/tinker/pull/133))\n\n## [v2.6.1 (2021-03-02)](https://github.com/laravel/tinker/compare/v2.6.0...v2.6.1)\n\n### Fixed\n\n- Display hidden/appended attributes for models ([#123](https://github.com/laravel/tinker/pull/123))\n\n## [v2.6.0 (2021-01-26)](https://github.com/laravel/tinker/compare/v2.5.0...v2.6.0)\n\n### Added\n\n- Add Stringable caster ([#121](https://github.com/laravel/tinker/pull/121))\n\n## [v2.5.0 (2020-10-29)](https://github.com/laravel/tinker/compare/v2.4.2...v2.5.0)\n\n### Added\n\n- PHP 8 Support ([#116](https://github.com/laravel/tinker/pull/116))\n\n## [v2.4.2 (2020-08-11)](https://github.com/laravel/tinker/compare/v2.4.1...v2.4.2)\n\n### Fixed\n\n- Fix missing output while using execute option ([#109](https://github.com/laravel/tinker/pull/109))\n\n## [v2.4.1 (2020-07-07)](https://github.com/laravel/tinker/compare/v2.4.0...v2.4.1)\n\n### Fixed\n\n- Fixed execute not unregistering loader and exit code ([#100](https://github.com/laravel/tinker/pull/100))\n\n## [v2.4.0 (2020-04-07)](https://github.com/laravel/tinker/compare/v2.3.0...v2.4.0)\n\n### Changed\n\n- Forward input options to psysh ([#98](https://github.com/laravel/tinker/pull/98))\n\n## [v2.3.0 (2020-03-17)](https://github.com/laravel/tinker/compare/v2.2.0...v2.3.0)\n\n### Added\n\n- Allow Laravel 8 ([#90](https://github.com/laravel/tinker/pull/90))\n- Allow psy/psysh 0.10 ([#95](https://github.com/laravel/tinker/pull/95))\n\n## [v2.2.0 (2020-02-05)](https://github.com/laravel/tinker/compare/v2.1.0...v2.2.0)\n\n### Added\n\n- Support vendor class aliasing ([#88](https://github.com/laravel/tinker/pull/88))\n- Add `--execute` option to console command ([#89](https://github.com/laravel/tinker/pull/89))\n\n## [v2.1.0 (2020-01-14)](https://github.com/laravel/tinker/compare/v2.0.0...v2.1.0)\n\n### Added\n\n- Add `HtmlString` caster ([#87](https://github.com/laravel/tinker/pull/87))\n\n## [v2.0.0 (2019-11-26)](https://github.com/laravel/tinker/compare/v1.0.10...v2.0.0)\n\n### Added\n\n- Allow Laravel 7 ([#74](https://github.com/laravel/tinker/pull/74))\n\n### Changed\n\n- Require PHP 7.2 as the new minimum version ([8d6104c](https://github.com/laravel/tinker/commit/8d6104cf50695e3f256d0389626c692e144d946b))\n- Allow Symfony 5 ([49982fd](https://github.com/laravel/tinker/commit/49982fd563035025998efe7f32d005bc6da2ce0a))\n- Laravel now only check for `DeferrableProvider` ([#81](https://github.com/laravel/tinker/pull/81))\n\n### Removed\n\n- Drop support for old Psysh versions ([a05922f](https://github.com/laravel/tinker/commit/a05922fa3b959d92efd16defe8e30a9895a69727))\n- Drop Symfony 3.x support ([7175b49](https://github.com/laravel/tinker/commit/7175b4931917d507989cda2c753113f71aa18816))\n- Drop support for Laravel 5.x ([4f3e609](https://github.com/laravel/tinker/commit/4f3e6098dff7ec4c0eedc5348184838598bc30c8))\n\n## v1.0.0 (2016-12-30)\n\nInitial commit.\n"
  },
  {
    "path": "LICENSE.md",
    "content": "The MIT License (MIT)\n\nCopyright (c) Taylor Otwell\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "<p align=\"center\"><img width=\"321\" height=\"80\" src=\"/art/logo.svg\" alt=\"Logo Laravel Tinker\"></p>\n\n<p align=\"center\">\n<a href=\"https://github.com/laravel/tinker/actions\"><img src=\"https://github.com/laravel/tinker/workflows/tests/badge.svg\" alt=\"Build Status\"></a>\n<a href=\"https://packagist.org/packages/laravel/tinker\"><img src=\"https://img.shields.io/packagist/dt/laravel/tinker\" alt=\"Total Downloads\"></a>\n<a href=\"https://packagist.org/packages/laravel/tinker\"><img src=\"https://img.shields.io/packagist/v/laravel/tinker\" alt=\"Latest Stable Version\"></a>\n<a href=\"https://packagist.org/packages/laravel/tinker\"><img src=\"https://img.shields.io/packagist/l/laravel/tinker\" alt=\"License\"></a>\n</p>\n\n## Introduction\n\nLaravel Tinker is a powerful REPL for the Laravel framework.\n\n## Official Documentation\n\nDocumentation for Tinker can be found on the [Laravel website](https://laravel.com/docs/artisan#tinker).\n\n## Contributing\n\nThank you for considering contributing to Tinker! The contribution guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions).\n\n## Code of Conduct\n\nIn order to ensure that the Laravel community is welcoming to all, please review and abide by the [Code of Conduct](https://laravel.com/docs/contributions#code-of-conduct).\n\n## Security Vulnerabilities\n\nPlease review [our security policy](https://github.com/laravel/tinker/security/policy) on how to report security vulnerabilities.\n\n## License\n\nLaravel Tinker is open-sourced software licensed under the [MIT license](LICENSE.md).\n"
  },
  {
    "path": "composer.json",
    "content": "{\n    \"name\": \"laravel/tinker\",\n    \"description\": \"Powerful REPL for the Laravel framework.\",\n    \"keywords\": [\"tinker\", \"repl\", \"psysh\", \"laravel\"],\n    \"license\": \"MIT\",\n    \"authors\": [\n        {\n            \"name\": \"Taylor Otwell\",\n            \"email\": \"taylor@laravel.com\"\n        }\n    ],\n    \"require\": {\n        \"php\": \"^7.2.5|^8.0\",\n        \"illuminate/console\": \"^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0\",\n        \"illuminate/contracts\": \"^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0\",\n        \"illuminate/support\": \"^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0\",\n        \"psy/psysh\": \"^0.11.1|^0.12.0\",\n        \"symfony/var-dumper\": \"^4.3.4|^5.0|^6.0|^7.0|^8.0\"\n    },\n    \"require-dev\": {\n        \"mockery/mockery\": \"~1.3.3|^1.4.2\",\n        \"phpstan/phpstan\": \"^1.10\",\n        \"phpunit/phpunit\": \"^8.5.8|^9.3.3|^10.0\"\n    },\n    \"suggest\": {\n        \"illuminate/database\": \"The Illuminate Database package (^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0).\"\n    },\n    \"autoload\": {\n        \"psr-4\": {\n            \"Laravel\\\\Tinker\\\\\": \"src/\"\n        }\n    },\n    \"autoload-dev\": {\n        \"psr-4\": {\n            \"Laravel\\\\Tinker\\\\Tests\\\\\": \"tests/\",\n            \"App\\\\\": \"tests/fixtures/app\",\n            \"One\\\\Two\\\\\": \"tests/fixtures/vendor/one/two\"\n        }\n    },\n    \"extra\": {\n        \"laravel\": {\n            \"providers\": [\n                \"Laravel\\\\Tinker\\\\TinkerServiceProvider\"\n            ]\n        }\n    },\n    \"config\": {\n        \"sort-packages\": true\n    },\n    \"minimum-stability\": \"dev\",\n    \"prefer-stable\": true\n}\n"
  },
  {
    "path": "config/tinker.php",
    "content": "<?php\n\nreturn [\n\n    /*\n    |--------------------------------------------------------------------------\n    | Console Commands\n    |--------------------------------------------------------------------------\n    |\n    | This option allows you to add additional Artisan commands that should\n    | be available within the Tinker environment. Once the command is in\n    | this array you may execute the command in Tinker using its name.\n    |\n    */\n\n    'commands' => [\n        // App\\Console\\Commands\\ExampleCommand::class,\n    ],\n\n    /*\n    |--------------------------------------------------------------------------\n    | Auto Aliased Classes\n    |--------------------------------------------------------------------------\n    |\n    | Tinker will not automatically alias classes in your vendor namespaces\n    | but you may explicitly allow a subset of classes to get aliased by\n    | adding the names of each of those classes to the following list.\n    |\n    */\n\n    'alias' => [\n        //\n    ],\n\n    /*\n    |--------------------------------------------------------------------------\n    | Classes That Should Not Be Aliased\n    |--------------------------------------------------------------------------\n    |\n    | Typically, Tinker automatically aliases classes as you require them in\n    | Tinker. However, you may wish to never alias certain classes, which\n    | you may accomplish by listing the classes in the following array.\n    |\n    */\n\n    'dont_alias' => [\n        'App\\Nova',\n    ],\n\n    /*\n    |--------------------------------------------------------------------------\n    | Project Trust Mode\n    |--------------------------------------------------------------------------\n    |\n    | PsySH restricts local project features unless your project is trusted.\n    | Set this to \"always\" to avoid untrusted project warnings in Tinker.\n    | Accepted values: \"prompt\", \"always\", \"never\", true, false, null.\n    |\n    */\n\n    'trust_project' => env('TINKER_TRUST_PROJECT', 'always'),\n\n];\n"
  },
  {
    "path": "phpstan.neon.dist",
    "content": "parameters:\n  paths:\n    - config\n    - src\n\n  level: 0\n\n  ignoreErrors:\n    - \"#Unsafe usage of new static\\\\(\\\\)#\"\n    - \"#Class Illuminate\\\\\\\\Foundation\\\\\\\\Application not found.#\"\n    - \"#Class Laravel\\\\\\\\Lumen\\\\\\\\Application not found.#\"\n"
  },
  {
    "path": "phpunit.xml.dist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<phpunit backupGlobals=\"false\"\n         backupStaticAttributes=\"false\"\n         bootstrap=\"vendor/autoload.php\"\n         colors=\"true\"\n         convertDeprecationsToExceptions=\"true\"\n         convertErrorsToExceptions=\"true\"\n         convertNoticesToExceptions=\"true\"\n         convertWarningsToExceptions=\"true\"\n         processIsolation=\"false\"\n         stopOnFailure=\"false\"\n>\n    <testsuites>\n        <testsuite name=\"Laravel Tinker Test Suite\">\n            <directory suffix=\"Test.php\">./tests/</directory>\n        </testsuite>\n    </testsuites>\n</phpunit>\n"
  },
  {
    "path": "src/ClassAliasAutoloader.php",
    "content": "<?php\n\nnamespace Laravel\\Tinker;\n\nuse Illuminate\\Support\\Str;\nuse Psy\\Shell;\n\nclass ClassAliasAutoloader\n{\n    /**\n     * The shell instance.\n     *\n     * @var \\Psy\\Shell\n     */\n    protected $shell;\n\n    /**\n     * All of the discovered classes.\n     *\n     * @var array\n     */\n    protected $classes = [];\n\n    /**\n     * Path to the vendor directory.\n     *\n     * @var string\n     */\n    protected $vendorPath;\n\n    /**\n     * Explicitly included namespaces/classes.\n     *\n     * @var \\Illuminate\\Support\\Collection\n     */\n    protected $includedAliases;\n\n    /**\n     * Excluded namespaces/classes.\n     *\n     * @var \\Illuminate\\Support\\Collection\n     */\n    protected $excludedAliases;\n\n    /**\n     * Register a new alias loader instance.\n     *\n     * @param  \\Psy\\Shell  $shell\n     * @param  string  $classMapPath\n     * @param  array  $includedAliases\n     * @param  array  $excludedAliases\n     * @return static\n     */\n    public static function register(Shell $shell, $classMapPath, array $includedAliases = [], array $excludedAliases = [])\n    {\n        return tap(new static($shell, $classMapPath, $includedAliases, $excludedAliases), function ($loader) {\n            spl_autoload_register([$loader, 'aliasClass']);\n        });\n    }\n\n    /**\n     * Create a new alias loader instance.\n     *\n     * @param  \\Psy\\Shell  $shell\n     * @param  string  $classMapPath\n     * @param  array  $includedAliases\n     * @param  array  $excludedAliases\n     * @return void\n     */\n    public function __construct(Shell $shell, $classMapPath, array $includedAliases = [], array $excludedAliases = [])\n    {\n        $this->shell = $shell;\n        $this->vendorPath = dirname(dirname($classMapPath));\n        $this->includedAliases = collect($includedAliases);\n        $this->excludedAliases = collect($excludedAliases);\n\n        $classes = require $classMapPath;\n\n        foreach ($classes as $class => $path) {\n            if (! $this->isAliasable($class, $path)) {\n                continue;\n            }\n\n            $name = class_basename($class);\n\n            if (! isset($this->classes[$name])) {\n                $this->classes[$name] = $class;\n            }\n        }\n    }\n\n    /**\n     * Find the closest class by name.\n     *\n     * @param  string  $class\n     * @return void\n     */\n    public function aliasClass($class)\n    {\n        if (Str::contains($class, '\\\\')) {\n            return;\n        }\n\n        $fullName = $this->classes[$class] ?? false;\n\n        if ($fullName) {\n            $this->shell->writeStdout(\"[!] Aliasing '{$class}' to '{$fullName}' for this Tinker session.\\n\");\n\n            class_alias($fullName, $class);\n        }\n    }\n\n    /**\n     * Unregister the alias loader instance.\n     *\n     * @return void\n     */\n    public function unregister()\n    {\n        spl_autoload_unregister([$this, 'aliasClass']);\n    }\n\n    /**\n     * Handle the destruction of the instance.\n     *\n     * @return void\n     */\n    public function __destruct()\n    {\n        $this->unregister();\n    }\n\n    /**\n     * Whether a class may be aliased.\n     *\n     * @param  string  $class\n     * @param  string  $path\n     */\n    public function isAliasable($class, $path)\n    {\n        if (! Str::contains($class, '\\\\')) {\n            return false;\n        }\n\n        if ($this->includedAliases->contains(function ($alias) use ($class) {\n            return Str::startsWith($class, $alias);\n        })) {\n            return true;\n        }\n\n        if (Str::startsWith($path, $this->vendorPath)) {\n            return false;\n        }\n\n        if ($this->excludedAliases->contains(function ($alias) use ($class) {\n            return Str::startsWith($class, $alias);\n        })) {\n            return false;\n        }\n\n        return true;\n    }\n}\n"
  },
  {
    "path": "src/Console/TinkerCommand.php",
    "content": "<?php\n\nnamespace Laravel\\Tinker\\Console;\n\nuse Illuminate\\Console\\Command;\nuse Illuminate\\Support\\Env;\nuse Laravel\\Tinker\\ClassAliasAutoloader;\nuse Psy\\Configuration;\nuse Psy\\Shell;\nuse Psy\\VersionUpdater\\Checker;\nuse Symfony\\Component\\Console\\Input\\InputArgument;\nuse Symfony\\Component\\Console\\Input\\InputOption;\n\nclass TinkerCommand extends Command\n{\n    /**\n     * Artisan commands to include in the tinker shell.\n     *\n     * @var array\n     */\n    protected $commandWhitelist = [\n        'clear-compiled', 'down', 'env', 'inspire', 'migrate', 'migrate:install', 'optimize', 'up',\n    ];\n\n    /**\n     * The console command name.\n     *\n     * @var string\n     */\n    protected $name = 'tinker';\n\n    /**\n     * The console command description.\n     *\n     * @var string\n     */\n    protected $description = 'Interact with your application';\n\n    /**\n     * Execute the console command.\n     *\n     * @return int\n     */\n    public function handle()\n    {\n        $this->getApplication()->setCatchExceptions(false);\n\n        $config = Configuration::fromInput($this->input);\n        $config->setUpdateCheck(Checker::NEVER);\n\n        $appConfig = $this->getLaravel()->make('config');\n        $config->setTrustProject($appConfig->get('tinker.trust_project'));\n\n        $config->getPresenter()->addCasters(\n            $this->getCasters()\n        );\n\n        if ($this->option('execute')) {\n            $config->setRawOutput(true);\n        }\n\n        $shell = new Shell($config);\n        $shell->addCommands($this->getCommands());\n        $shell->setIncludes($this->argument('include'));\n\n        $path = Env::get('COMPOSER_VENDOR_DIR', $this->getLaravel()->basePath().DIRECTORY_SEPARATOR.'vendor');\n\n        $path .= '/composer/autoload_classmap.php';\n\n        $loader = ClassAliasAutoloader::register(\n            $shell, $path, $appConfig->get('tinker.alias', []), $appConfig->get('tinker.dont_alias', [])\n        );\n\n        if ($code = $this->option('execute')) {\n            try {\n                $shell->setOutput($this->output);\n                $shell->execute($code);\n            } finally {\n                $loader->unregister();\n            }\n\n            return 0;\n        }\n\n        try {\n            return $shell->run();\n        } finally {\n            $loader->unregister();\n        }\n    }\n\n    /**\n     * Get artisan commands to pass through to PsySH.\n     *\n     * @return array\n     */\n    protected function getCommands()\n    {\n        $commands = [];\n\n        foreach ($this->getApplication()->all() as $name => $command) {\n            if (in_array($name, $this->commandWhitelist)) {\n                $commands[] = $command;\n            }\n        }\n\n        $config = $this->getLaravel()->make('config');\n\n        foreach ($config->get('tinker.commands', []) as $command) {\n            $commands[] = $this->getApplication()->add(\n                $this->getLaravel()->make($command)\n            );\n        }\n\n        return $commands;\n    }\n\n    /**\n     * Get an array of Laravel tailored casters.\n     *\n     * @return array\n     */\n    protected function getCasters()\n    {\n        $casters = [\n            'Illuminate\\Support\\Collection' => 'Laravel\\Tinker\\TinkerCaster::castCollection',\n            'Illuminate\\Support\\HtmlString' => 'Laravel\\Tinker\\TinkerCaster::castHtmlString',\n            'Illuminate\\Support\\Stringable' => 'Laravel\\Tinker\\TinkerCaster::castStringable',\n        ];\n\n        if (class_exists('Illuminate\\Database\\Eloquent\\Model')) {\n            $casters['Illuminate\\Database\\Eloquent\\Model'] = 'Laravel\\Tinker\\TinkerCaster::castModel';\n        }\n\n        if (class_exists('Illuminate\\Process\\ProcessResult')) {\n            $casters['Illuminate\\Process\\ProcessResult'] = 'Laravel\\Tinker\\TinkerCaster::castProcessResult';\n        }\n\n        if (class_exists('Illuminate\\Foundation\\Application')) {\n            $casters['Illuminate\\Foundation\\Application'] = 'Laravel\\Tinker\\TinkerCaster::castApplication';\n        }\n\n        $config = $this->getLaravel()->make('config');\n\n        return array_merge($casters, (array) $config->get('tinker.casters', []));\n    }\n\n    /**\n     * Get the console command arguments.\n     *\n     * @return array\n     */\n    protected function getArguments()\n    {\n        return [\n            ['include', InputArgument::IS_ARRAY, 'Include file(s) before starting tinker'],\n        ];\n    }\n\n    /**\n     * Get the console command options.\n     *\n     * @return array\n     */\n    protected function getOptions()\n    {\n        return [\n            ['execute', null, InputOption::VALUE_OPTIONAL, 'Execute the given code using Tinker'],\n        ];\n    }\n}\n"
  },
  {
    "path": "src/TinkerCaster.php",
    "content": "<?php\n\nnamespace Laravel\\Tinker;\n\nuse Exception;\nuse Symfony\\Component\\VarDumper\\Caster\\Caster;\n\nclass TinkerCaster\n{\n    /**\n     * Application methods to include in the presenter.\n     *\n     * @var array\n     */\n    private static $appProperties = [\n        'configurationIsCached',\n        'environment',\n        'environmentFile',\n        'isLocal',\n        'routesAreCached',\n        'runningUnitTests',\n        'version',\n        'path',\n        'basePath',\n        'configPath',\n        'databasePath',\n        'langPath',\n        'publicPath',\n        'storagePath',\n        'bootstrapPath',\n    ];\n\n    /**\n     * Get an array representing the properties of an application.\n     *\n     * @param  \\Illuminate\\Foundation\\Application  $app\n     * @return array\n     */\n    public static function castApplication($app)\n    {\n        $results = [];\n\n        foreach (self::$appProperties as $property) {\n            try {\n                $val = $app->$property();\n\n                if (! is_null($val)) {\n                    $results[Caster::PREFIX_VIRTUAL.$property] = $val;\n                }\n            } catch (Exception $e) {\n                //\n            }\n        }\n\n        return $results;\n    }\n\n    /**\n     * Get an array representing the properties of a collection.\n     *\n     * @param  \\Illuminate\\Support\\Collection  $collection\n     * @return array\n     */\n    public static function castCollection($collection)\n    {\n        return [\n            Caster::PREFIX_VIRTUAL.'all' => $collection->all(),\n        ];\n    }\n\n    /**\n     * Get an array representing the properties of an html string.\n     *\n     * @param  \\Illuminate\\Support\\HtmlString  $htmlString\n     * @return array\n     */\n    public static function castHtmlString($htmlString)\n    {\n        return [\n            Caster::PREFIX_VIRTUAL.'html' => $htmlString->toHtml(),\n        ];\n    }\n\n    /**\n     * Get an array representing the properties of a fluent string.\n     *\n     * @param  \\Illuminate\\Support\\Stringable  $stringable\n     * @return array\n     */\n    public static function castStringable($stringable)\n    {\n        return [\n            Caster::PREFIX_VIRTUAL.'value' => (string) $stringable,\n        ];\n    }\n\n    /**\n     * Get an array representing the properties of a process result.\n     *\n     * @param  \\Illuminate\\Process\\ProcessResult  $result\n     * @return array\n     */\n    public static function castProcessResult($result)\n    {\n        return [\n            Caster::PREFIX_VIRTUAL.'output' => $result->output(),\n            Caster::PREFIX_VIRTUAL.'errorOutput' => $result->errorOutput(),\n            Caster::PREFIX_VIRTUAL.'exitCode' => $result->exitCode(),\n            Caster::PREFIX_VIRTUAL.'successful' => $result->successful(),\n        ];\n    }\n\n    /**\n     * Get an array representing the properties of a model.\n     *\n     * @param  \\Illuminate\\Database\\Eloquent\\Model  $model\n     * @return array\n     */\n    public static function castModel($model)\n    {\n        $attributes = array_merge(\n            $model->getAttributes(), $model->getRelations()\n        );\n\n        $visible = array_flip(\n            $model->getVisible() ?: array_diff(array_keys($attributes), $model->getHidden())\n        );\n\n        $hidden = array_flip($model->getHidden());\n\n        $appends = (function () {\n            return array_combine($this->appends, $this->appends); // @phpstan-ignore-line\n        })->bindTo($model, $model)();\n\n        foreach ($appends as $appended) {\n            $attributes[$appended] = $model->{$appended};\n        }\n\n        $results = [];\n\n        foreach ($attributes as $key => $value) {\n            $prefix = '';\n\n            if (isset($visible[$key])) {\n                $prefix = Caster::PREFIX_VIRTUAL;\n            }\n\n            if (isset($hidden[$key])) {\n                $prefix = Caster::PREFIX_PROTECTED;\n            }\n\n            $results[$prefix.$key] = $value;\n        }\n\n        return $results;\n    }\n}\n"
  },
  {
    "path": "src/TinkerServiceProvider.php",
    "content": "<?php\n\nnamespace Laravel\\Tinker;\n\nuse Illuminate\\Contracts\\Support\\DeferrableProvider;\nuse Illuminate\\Foundation\\Application as LaravelApplication;\nuse Illuminate\\Support\\ServiceProvider;\nuse Laravel\\Lumen\\Application as LumenApplication;\nuse Laravel\\Tinker\\Console\\TinkerCommand;\n\nclass TinkerServiceProvider extends ServiceProvider implements DeferrableProvider\n{\n    /**\n     * Boot the service provider.\n     *\n     * @return void\n     */\n    public function boot()\n    {\n        $source = realpath($raw = __DIR__.'/../config/tinker.php') ?: $raw;\n\n        if ($this->app instanceof LaravelApplication && $this->app->runningInConsole()) {\n            $this->publishes([$source => $this->app->configPath('tinker.php')]);\n        } elseif ($this->app instanceof LumenApplication) {\n            $this->app->configure('tinker');\n        }\n\n        $this->mergeConfigFrom($source, 'tinker');\n    }\n\n    /**\n     * Register the service provider.\n     *\n     * @return void\n     */\n    public function register()\n    {\n        $this->app->singleton('command.tinker', function () {\n            return new TinkerCommand;\n        });\n\n        $this->commands(['command.tinker']);\n    }\n\n    /**\n     * Get the services provided by the provider.\n     *\n     * @return array\n     */\n    public function provides()\n    {\n        return ['command.tinker'];\n    }\n}\n"
  },
  {
    "path": "tests/ClassAliasAutoloaderTest.php",
    "content": "<?php\n\nnamespace Laravel\\Tinker\\Tests;\n\nuse Laravel\\Tinker\\ClassAliasAutoloader;\nuse Mockery;\nuse PHPUnit\\Framework\\TestCase;\nuse Psy\\Shell;\n\nclass ClassAliasAutoloaderTest extends TestCase\n{\n    protected $classmapPath;\n    protected $loader;\n\n    protected function setUp(): void\n    {\n        $this->classmapPath = __DIR__.'/fixtures/vendor/composer/autoload_classmap.php';\n    }\n\n    protected function tearDown(): void\n    {\n        $this->loader->unregister();\n    }\n\n    public function testCanAliasClasses()\n    {\n        $this->loader = ClassAliasAutoloader::register(\n            $shell = Mockery::mock(Shell::class),\n            $this->classmapPath\n        );\n\n        $shell->shouldReceive('writeStdout')\n            ->with(\"[!] Aliasing 'Bar' to 'App\\Foo\\Bar' for this Tinker session.\\n\")\n            ->once();\n\n        $this->assertTrue(class_exists('Bar'));\n        $this->assertInstanceOf(\\App\\Foo\\Bar::class, new \\Bar);\n    }\n\n    public function testCanExcludeNamespacesFromAliasing()\n    {\n        $this->loader = ClassAliasAutoloader::register(\n            $shell = Mockery::mock(Shell::class),\n            $this->classmapPath,\n            [],\n            ['App\\Baz']\n        );\n\n        $shell->shouldNotReceive('writeStdout');\n\n        $this->assertFalse(class_exists('Qux'));\n    }\n\n    public function testVendorClassesAreExcluded()\n    {\n        $this->loader = ClassAliasAutoloader::register(\n            $shell = Mockery::mock(Shell::class),\n            $this->classmapPath\n        );\n\n        $shell->shouldNotReceive('writeStdout');\n\n        $this->assertFalse(class_exists('Three'));\n    }\n\n    public function testVendorClassesCanBeWhitelisted()\n    {\n        $this->loader = ClassAliasAutoloader::register(\n            $shell = Mockery::mock(Shell::class),\n            $this->classmapPath,\n            ['One\\Two']\n        );\n\n        $shell->shouldReceive('writeStdout')\n            ->with(\"[!] Aliasing 'Three' to 'One\\Two\\Three' for this Tinker session.\\n\")\n            ->once();\n\n        $this->assertTrue(class_exists('Three'));\n        $this->assertInstanceOf(\\One\\Two\\Three::class, new \\Three);\n    }\n}\n"
  },
  {
    "path": "tests/TinkerCasterTest.php",
    "content": "<?php\n\nnamespace Laravel\\Tinker\\Tests;\n\nuse Illuminate\\Support\\Collection;\nuse Laravel\\Tinker\\TinkerCaster;\nuse PHPUnit\\Framework\\TestCase;\n\nclass TinkerCasterTest extends TestCase\n{\n    public function testCanCastCollection()\n    {\n        $caster = new TinkerCaster;\n\n        $result = $caster->castCollection(new Collection(['foo', 'bar']));\n\n        $this->assertSame([['foo', 'bar']], array_values($result));\n    }\n}\n"
  },
  {
    "path": "tests/fixtures/app/Baz/Qux.php",
    "content": "<?php\n\nnamespace App\\Baz;\n\nclass Qux\n{\n    //\n}\n"
  },
  {
    "path": "tests/fixtures/app/Foo/Bar.php",
    "content": "<?php\n\nnamespace App\\Foo;\n\nclass Bar\n{\n    //\n}\n"
  },
  {
    "path": "tests/fixtures/vendor/composer/autoload_classmap.php",
    "content": "<?php\n$vendorDir = dirname(dirname(__FILE__));\n$baseDir = dirname($vendorDir);\nreturn array(\n    'App\\\\Foo\\\\Bar' => $baseDir.'/app/Foo/Bar.php',\n    'App\\\\Baz\\\\Qux' => $baseDir.'/app/Baz/Qux.php',\n    'One\\\\Two\\\\Three' => $vendorDir.'/one/two/src/Three.php',\n    'Four\\\\Five\\\\Six' => $vendorDir.'/four/five/src/Six.php',\n);\n"
  },
  {
    "path": "tests/fixtures/vendor/one/two/Three.php",
    "content": "<?php\n\nnamespace One\\Two;\n\nclass Three\n{\n    //\n}\n"
  }
]