├── .editorconfig ├── .github ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── FUNDING.yml ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md ├── SECURITY.md ├── config.yml ├── dependabot.yml ├── stale.yml └── workflows │ ├── dependabot-auto-merge.yml │ ├── feed.yml │ ├── mirror.yml │ ├── php-cs-fixer.yml │ ├── rector.yml │ ├── secret-check.yml │ ├── stale.yml │ └── tests.yml ├── .gitignore ├── .lintmdrc ├── .php-cs-fixer.php ├── .zhlintrc ├── LICENSE ├── README-2018.md ├── README-2019.md ├── README-2020.md ├── README-2021.md ├── README-2022.md ├── README-2023.md ├── README-2024.md ├── README.atom ├── README.md ├── README.rss ├── _config.yml ├── app ├── Commands │ ├── Command.php │ ├── FeedCommand.php │ └── InspireCommand.php └── Providers │ └── AppServiceProvider.php ├── bootstrap ├── app.php └── providers.php ├── composer-updater ├── composer.json ├── composer.lock ├── config ├── app.php ├── commands.php ├── github.php └── laravel-console-summary.php ├── favorite-link ├── phpunit.xml.dist ├── rector.php └── tests ├── CreatesApplication.php ├── Datasets └── Movies.php ├── Faker.php ├── Feature ├── ArchTest.php ├── FeedCommandTest.php └── InspireCommandTest.php ├── Fixtures └── README.md ├── Pest.php ├── TestCase.php └── Unit └── ExampleTest.php /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 4 6 | end_of_line = lf 7 | charset = utf-8 8 | trim_trailing_whitespace = true 9 | insert_final_newline = false 10 | 11 | [*.{vue,js,scss}] 12 | indent_size = 2 13 | insert_final_newline = true 14 | 15 | [*.md] 16 | trim_trailing_whitespace = false 17 | 18 | [*.{yml,yaml,xml,xml.dist}] 19 | indent_size = 2 -------------------------------------------------------------------------------- /.github/CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | We as members, contributors, and leaders pledge to make participation in our 6 | community a harassment-free experience for everyone, regardless of age, body 7 | size, visible or invisible disability, ethnicity, sex characteristics, gender 8 | identity and expression, level of experience, education, socio-economic status, 9 | nationality, personal appearance, race, religion, or sexual identity 10 | and orientation. 11 | 12 | We pledge to act and interact in ways that contribute to an open, welcoming, 13 | diverse, inclusive, and healthy community. 14 | 15 | ## Our Standards 16 | 17 | Examples of behavior that contributes to a positive environment for our 18 | community include: 19 | 20 | * Demonstrating empathy and kindness toward other people 21 | * Being respectful of differing opinions, viewpoints, and experiences 22 | * Giving and gracefully accepting constructive feedback 23 | * Accepting responsibility and apologizing to those affected by our mistakes, 24 | and learning from the experience 25 | * Focusing on what is best not just for us as individuals, but for the 26 | overall community 27 | 28 | Examples of unacceptable behavior include: 29 | 30 | * The use of sexualized language or imagery, and sexual attention or 31 | advances of any kind 32 | * Trolling, insulting or derogatory comments, and personal or political attacks 33 | * Public or private harassment 34 | * Publishing others' private information, such as a physical or email 35 | address, without their explicit permission 36 | * Other conduct which could reasonably be considered inappropriate in a 37 | professional setting 38 | 39 | ## Enforcement Responsibilities 40 | 41 | Community leaders are responsible for clarifying and enforcing our standards of 42 | acceptable behavior and will take appropriate and fair corrective action in 43 | response to any behavior that they deem inappropriate, threatening, offensive, 44 | or harmful. 45 | 46 | Community leaders have the right and responsibility to remove, edit, or reject 47 | comments, commits, code, wiki edits, issues, and other contributions that are 48 | not aligned to this Code of Conduct, and will communicate reasons for moderation 49 | decisions when appropriate. 50 | 51 | ## Scope 52 | 53 | This Code of Conduct applies within all community spaces, and also applies when 54 | an individual is officially representing the community in public spaces. 55 | Examples of representing our community include using an official e-mail address, 56 | posting via an official social media account, or acting as an appointed 57 | representative at an online or offline event. 58 | 59 | ## Enforcement 60 | 61 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 62 | reported to the community leaders responsible for enforcement at 63 | ityaozm@gmail.com. 64 | All complaints will be reviewed and investigated promptly and fairly. 65 | 66 | All community leaders are obligated to respect the privacy and security of the 67 | reporter of any incident. 68 | 69 | ## Enforcement Guidelines 70 | 71 | Community leaders will follow these Community Impact Guidelines in determining 72 | the consequences for any action they deem in violation of this Code of Conduct: 73 | 74 | ### 1. Correction 75 | 76 | **Community Impact**: Use of inappropriate language or other behavior deemed 77 | unprofessional or unwelcome in the community. 78 | 79 | **Consequence**: A private, written warning from community leaders, providing 80 | clarity around the nature of the violation and an explanation of why the 81 | behavior was inappropriate. A public apology may be requested. 82 | 83 | ### 2. Warning 84 | 85 | **Community Impact**: A violation through a single incident or series 86 | of actions. 87 | 88 | **Consequence**: A warning with consequences for continued behavior. No 89 | interaction with the people involved, including unsolicited interaction with 90 | those enforcing the Code of Conduct, for a specified period of time. This 91 | includes avoiding interactions in community spaces as well as external channels 92 | like social media. Violating these terms may lead to a temporary or 93 | permanent ban. 94 | 95 | ### 3. Temporary Ban 96 | 97 | **Community Impact**: A serious violation of community standards, including 98 | sustained inappropriate behavior. 99 | 100 | **Consequence**: A temporary ban from any sort of interaction or public 101 | communication with the community for a specified period of time. No public or 102 | private interaction with the people involved, including unsolicited interaction 103 | with those enforcing the Code of Conduct, is allowed during this period. 104 | Violating these terms may lead to a permanent ban. 105 | 106 | ### 4. Permanent Ban 107 | 108 | **Community Impact**: Demonstrating a pattern of violation of community 109 | standards, including sustained inappropriate behavior, harassment of an 110 | individual, or aggression toward or disparagement of classes of individuals. 111 | 112 | **Consequence**: A permanent ban from any sort of public interaction within 113 | the community. 114 | 115 | ## Attribution 116 | 117 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], 118 | version 2.0, available at 119 | https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. 120 | 121 | Community Impact Guidelines were inspired by [Mozilla's code of conduct 122 | enforcement ladder](https://github.com/mozilla/diversity). 123 | 124 | [homepage]: https://www.contributor-covenant.org 125 | 126 | For answers to common questions about this code of conduct, see the FAQ at 127 | https://www.contributor-covenant.org/faq. Translations are available at 128 | https://www.contributor-covenant.org/translations. 129 | -------------------------------------------------------------------------------- /.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | Contributions are **welcome** and will be fully **credited**. 4 | 5 | Please read and understand the contribution guide before creating an issue or pull request. 6 | 7 | ## Etiquette 8 | 9 | This project is open source, and as such, the maintainers give their free time to build and maintain the source code 10 | held within. They make the code freely available in the hope that it will be of use to other developers. It would be 11 | extremely unfair for them to suffer abuse or anger for their hard work. 12 | 13 | Please be considerate towards maintainers when raising issues or presenting pull requests. Let's show the 14 | world that developers are civilized and selfless people. 15 | 16 | It's the duty of the maintainer to ensure that all submissions to the project are of sufficient 17 | quality to benefit the project. Many developers have different skillsets, strengths, and weaknesses. Respect the maintainer's decision, and do not be upset or abusive if your submission is not used. 18 | 19 | ## Viability 20 | 21 | When requesting or submitting new features, first consider whether it might be useful to others. Open 22 | source projects are used by many developers, who may have entirely different needs to your own. Think about 23 | whether or not your feature is likely to be used by other users of the project. 24 | 25 | ## Procedure 26 | 27 | Before filing an issue: 28 | 29 | - Attempt to replicate the problem, to ensure that it wasn't a coincidental incident. 30 | - Check to make sure your feature suggestion isn't already present within the project. 31 | - Check the pull requests tab to ensure that the bug doesn't have a fix in progress. 32 | - Check the pull requests tab to ensure that the feature isn't already in progress. 33 | 34 | Before submitting a pull request: 35 | 36 | - Check the codebase to ensure that your feature doesn't already exist. 37 | - Check the pull requests to ensure that another person hasn't already submitted the feature or fix. 38 | 39 | ## Requirements 40 | 41 | If the project maintainer has any additional requirements, you will find them listed here. 42 | 43 | - **[PSR-2 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)** - The easiest way to apply the conventions is to install [PHP Code Sniffer](https://pear.php.net/package/PHP_CodeSniffer). 44 | 45 | - **Add tests!** - Your patch won't be accepted if it doesn't have tests. 46 | 47 | - **Document any change in behaviour** - Make sure the `README.md` and any other relevant documentation are kept up-to-date. 48 | 49 | - **Consider our release cycle** - We try to follow [SemVer v2.0.0](https://semver.org/). Randomly breaking public APIs is not an option. 50 | 51 | - **One pull request per feature** - If you want to do more than one thing, send multiple pull requests. 52 | 53 | - **Send coherent history** - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please [squash them](https://www.git-scm.com/book/en/v2/Git-Tools-Rewriting-History#Changing-Multiple-Commit-Messages) before submitting. 54 | 55 | **Happy coding**! 56 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | patreon: guanguans 4 | custom: https://www.guanguans.cn/images/wechat.jpeg 5 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: bug 6 | assignees: guanguans 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '……' 16 | 2. Click on '……' 17 | 3. Scroll down to '……' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Additional context** 27 | Add any other context about the problem here. -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: good idea 6 | assignees: guanguans 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. -------------------------------------------------------------------------------- /.github/SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | If you discover any security related issues, please email ityaozm@gmail.com instead of using the issue tracker. 4 | -------------------------------------------------------------------------------- /.github/config.yml: -------------------------------------------------------------------------------- 1 | # Configuration for todo - https://github.com/JasonEtco/todo 2 | todo: 3 | keyword: "@todo" 4 | 5 | 6 | 7 | # Configuration for new-issue-welcome - https://github.com/behaviorbot/new-issue-welcome 8 | # Comment to be posted to on first time issues 9 | newIssueWelcomeComment: > 10 | Thanks for opening your first issue here! Be sure to follow the issue template! 11 | 12 | # Configuration for new-pr-welcome - https://github.com/behaviorbot/new-pr-welcome 13 | # Comment to be posted to on PRs from first time contributors in your repository 14 | newPRWelcomeComment: > 15 | Thanks for opening this pull request! Please check out our contributing guidelines. 16 | 17 | # Configuration for first-pr-merge - https://github.com/behaviorbot/first-pr-merge 18 | # Comment to be posted to on pull requests merged by a first time user 19 | firstPRMergeComment: > 20 | Congrats on merging your first pull request! We here at behaviorbot are proud of you! 21 | # It is recommend to include as many gifs and emojis as possible 22 | 23 | 24 | 25 | # Configuration for request-info - https://github.com/behaviorbot/request-info 26 | # *OPTIONAL* Comment to reply with 27 | # Can be either a string : 28 | requestInfoReplyComment: > 29 | We would appreciate it if you could provide us with more info about this issue/pr! 30 | 31 | # Or an array: 32 | # requestInfoReplyComment: 33 | # - Ah no! young blade! That was a trifle short! 34 | # - Tell me more ! 35 | # - I am sure you can be more effusive 36 | 37 | 38 | # *OPTIONAL* default titles to check against for lack of descriptiveness 39 | # MUST BE ALL LOWERCASE 40 | requestInfoDefaultTitles: 41 | - update readme.md 42 | - updates 43 | 44 | # *OPTIONAL* Label to be added to Issues and Pull Requests with insufficient information given 45 | requestInfoLabelToAdd: needs-more-info 46 | 47 | # *OPTIONAL* Require Issues to contain more information than what is provided in the issue templates 48 | # Will fail if the issue's body is equal to a provided template 49 | checkIssueTemplate: true 50 | 51 | # *OPTIONAL* Require Pull Requests to contain more information than what is provided in the PR template 52 | # Will fail if the pull request's body is equal to the provided template 53 | checkPullRequestTemplate: true 54 | 55 | # *OPTIONAL* Only warn about insufficient information on these events type 56 | # Keys must be lowercase. Valid values are 'issue' and 'pullRequest' 57 | requestInfoOn: 58 | pullRequest: true 59 | issue: true 60 | 61 | # *OPTIONAL* Add a list of people whose Issues/PRs will not be commented on 62 | # keys must be GitHub usernames 63 | requestInfoUserstoExclude: 64 | - guannguans 65 | 66 | 67 | # Configuration for update-docs - https://github.com/behaviorbot/update-docs 68 | # Comment to be posted to on PRs that don't update documentation 69 | updateDocsComment: > 70 | Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would update some of our documentation based on your changes. 71 | 72 | updateDocsWhiteList: 73 | - bug 74 | - chore 75 | 76 | updateDocsTargetFiles: 77 | - README 78 | - docs/ -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: github-actions 4 | directory: "/" 5 | schedule: 6 | interval: daily 7 | time: "21:00" 8 | open-pull-requests-limit: 10 9 | 10 | - package-ecosystem: composer 11 | directory: "/" 12 | schedule: 13 | interval: daily 14 | time: "21:00" 15 | open-pull-requests-limit: 10 -------------------------------------------------------------------------------- /.github/stale.yml: -------------------------------------------------------------------------------- 1 | # Number of days of inactivity before an issue becomes stale 2 | daysUntilStale: 60 3 | # Number of days of inactivity before a stale issue is closed 4 | daysUntilClose: 7 5 | # Issues with these labels will never be considered stale 6 | exemptLabels: 7 | - pinned 8 | - security 9 | # Label to use when marking an issue as stale 10 | staleLabel: wontfix 11 | # Comment to post when marking an issue as stale. Set to `false` to disable 12 | markComment: > 13 | This issue has been automatically marked as stale because it has not had 14 | recent activity. It will be closed if no further activity occurs. Thank you 15 | for your contributions. 16 | # Comment to post when closing a stale issue. Set to `false` to disable 17 | closeComment: false -------------------------------------------------------------------------------- /.github/workflows/dependabot-auto-merge.yml: -------------------------------------------------------------------------------- 1 | name: dependabot-auto-merge 2 | on: [ workflow_dispatch, pull_request_target ] 3 | 4 | permissions: 5 | pull-requests: write 6 | contents: write 7 | 8 | jobs: 9 | dependabot: 10 | runs-on: ubuntu-latest 11 | if: ${{ github.actor == 'dependabot[bot]' }} 12 | steps: 13 | 14 | - name: Dependabot metadata 15 | id: metadata 16 | uses: dependabot/fetch-metadata@v2.4.0 17 | with: 18 | github-token: "${{ secrets.GITHUB_TOKEN }}" 19 | 20 | - name: Auto-merge Dependabot PRs for semver-minor updates 21 | if: ${{steps.metadata.outputs.update-type == 'version-update:semver-minor'}} 22 | run: gh pr merge --auto --merge "$PR_URL" 23 | env: 24 | PR_URL: ${{github.event.pull_request.html_url}} 25 | GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} 26 | 27 | - name: Auto-merge Dependabot PRs for semver-patch updates 28 | if: ${{steps.metadata.outputs.update-type == 'version-update:semver-patch'}} 29 | run: gh pr merge --auto --merge "$PR_URL" 30 | env: 31 | PR_URL: ${{github.event.pull_request.html_url}} 32 | GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} -------------------------------------------------------------------------------- /.github/workflows/feed.yml: -------------------------------------------------------------------------------- 1 | name: feed 2 | 3 | on: 4 | workflow_dispatch: 5 | push: 6 | paths: 7 | - '**.md' 8 | - '**.php' 9 | - '.*rc' 10 | - '.github/**.yaml' 11 | - '.github/**.yml' 12 | pull_request: 13 | paths: 14 | - '**.md' 15 | - '**.php' 16 | - '.*rc' 17 | - '.github/**.yaml' 18 | - '.github/**.yml' 19 | 20 | jobs: 21 | feed: 22 | name: feed 23 | runs-on: ubuntu-latest 24 | steps: 25 | - name: Checkout 26 | uses: actions/checkout@v4 27 | 28 | - name: Set node version 29 | uses: actions/setup-node@v4 30 | 31 | - name: Install lint-md 32 | run: npm install @lint-md/cli -g 33 | 34 | - name: Install zhlint 35 | run: npm install zhlint -g 36 | 37 | - name: Fix markdown 38 | run: lint-md 'README.md' --config=.lintmdrc --threads --fix 39 | 40 | - name: Fix zh_CN 41 | run: zhlint 'README.md' --config=.zhlintrc --fix 42 | 43 | - name: Setup PHP 44 | uses: shivammathur/setup-php@v2 45 | with: 46 | php-version: '8.4' 47 | extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick 48 | coverage: none 49 | 50 | - name: Cache composer dependencies 51 | uses: actions/cache@v4 52 | with: 53 | path: vendor 54 | key: composer-${{ hashFiles('composer.lock') }} 55 | 56 | - name: Run composer install 57 | run: composer install --no-interaction --prefer-dist --ansi -v 58 | 59 | - name: Run feed 60 | run: ./favorite-link feed:generate --ansi -v 61 | 62 | - name: Commit changes 63 | uses: stefanzweifel/git-auto-commit-action@v5 64 | with: 65 | commit_options: '--no-verify' 66 | commit_message: 'Update feed' 67 | file_pattern: '**.atom **.rss README.md' 68 | -------------------------------------------------------------------------------- /.github/workflows/mirror.yml: -------------------------------------------------------------------------------- 1 | name: mirror 2 | 3 | on: [ workflow_dispatch, push, delete ] 4 | 5 | jobs: 6 | to_gitlab: 7 | runs-on: ubuntu-latest 8 | steps: 9 | - uses: actions/checkout@v4 10 | with: 11 | fetch-depth: 0 12 | - uses: pixta-dev/repository-mirroring-action@v1 13 | with: 14 | target_repo_url: 15 | git@gitlab.com:yzmguanguan/favorite-link.git 16 | ssh_private_key: 17 | ${{ secrets.GITLAB_SSH_PRIVATE_KEY }} 18 | -------------------------------------------------------------------------------- /.github/workflows/php-cs-fixer.yml: -------------------------------------------------------------------------------- 1 | name: check & fix styling 2 | 3 | on: 4 | workflow_dispatch: 5 | push: 6 | paths: 7 | - '.github/**.yml' 8 | - '.github/**.yaml' 9 | - '**.php' 10 | pull_request: 11 | paths: 12 | - '.github/**.yml' 13 | - '.github/**.yaml' 14 | - '**.php' 15 | 16 | jobs: 17 | php-cs-fixer: 18 | name: php-cs-fixer 19 | runs-on: ubuntu-latest 20 | steps: 21 | - uses: actions/checkout@v4 22 | 23 | - name: Setup PHP 24 | uses: shivammathur/setup-php@v2 25 | with: 26 | php-version: '8.4' 27 | extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick 28 | coverage: none 29 | 30 | - name: Cache composer dependencies 31 | uses: actions/cache@v4 32 | with: 33 | path: vendor 34 | key: composer-${{ hashFiles('composer.lock') }} 35 | 36 | - name: Run composer install 37 | run: composer install --no-interaction --prefer-dist --ansi -v 38 | 39 | - name: Run php-cs-fixer 40 | run: composer style-fix 41 | 42 | - name: Commit changes 43 | uses: stefanzweifel/git-auto-commit-action@v5 44 | with: 45 | commit_options: '--no-verify' 46 | commit_message: Fix styling 47 | file_pattern: '**.php' 48 | -------------------------------------------------------------------------------- /.github/workflows/rector.yml: -------------------------------------------------------------------------------- 1 | name: rector 2 | 3 | on: 4 | workflow_dispatch: 5 | push: 6 | paths: 7 | - '**.php' 8 | - '.github/**.yml' 9 | - '.github/**.yaml' 10 | - '*.xml' 11 | - '*.xml.dist' 12 | pull_request: 13 | paths: 14 | - '**.php' 15 | - '.github/**.yml' 16 | - '.github/**.yaml' 17 | - '*.xml' 18 | - '*.xml.dist' 19 | 20 | jobs: 21 | rector: 22 | name: rector 23 | runs-on: ubuntu-latest 24 | steps: 25 | - uses: actions/checkout@v4 26 | 27 | - name: Setup PHP 28 | uses: shivammathur/setup-php@v2 29 | with: 30 | php-version: '8.4' 31 | extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick 32 | coverage: none 33 | 34 | - name: Cache composer dependencies 35 | uses: actions/cache@v4 36 | with: 37 | path: vendor 38 | key: composer-${{ hashFiles('composer.lock') }} 39 | 40 | - name: Run composer install 41 | run: composer install --no-interaction --prefer-dist --ansi -v 42 | 43 | - name: Run rector 44 | run: composer rector-dry-run 45 | -------------------------------------------------------------------------------- /.github/workflows/secret-check.yml: -------------------------------------------------------------------------------- 1 | name: secrets check 2 | 3 | on: 4 | workflow_dispatch: 5 | pull_request: 6 | push: 7 | 8 | jobs: 9 | security-check: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - name: Checkout code 13 | uses: actions/checkout@v4 14 | with: 15 | # ref: ${{ github.ref_name }} 16 | fetch-depth: 0 17 | - name: Secret Scanning 18 | uses: trufflesecurity/trufflehog@main 19 | with: 20 | # path: ./ 21 | # base: ${{ github.event.repository.default_branch }} 22 | # head: ${{ github.ref_name }} 23 | # extra_args: --results=verified,unknown --only-verified --debug 24 | extra_args: --results=verified,unknown 25 | -------------------------------------------------------------------------------- /.github/workflows/stale.yml: -------------------------------------------------------------------------------- 1 | # This workflow warns and then closes issues and PRs that have had no activity for a specified amount of time. 2 | # 3 | # You can adjust the behavior by modifying this file. 4 | # For more information, see: 5 | # https://github.com/actions/stale 6 | name: Mark stale issues and pull requests 7 | 8 | on: 9 | workflow_dispatch: 10 | schedule: 11 | - cron: '30 08 * * *' 12 | 13 | jobs: 14 | stale: 15 | 16 | runs-on: ubuntu-latest 17 | permissions: 18 | issues: write 19 | pull-requests: write 20 | 21 | steps: 22 | - uses: actions/stale@v9 23 | with: 24 | repo-token: ${{ secrets.GITHUB_TOKEN }} 25 | stale-issue-message: 'Stale issue message' 26 | stale-pr-message: 'Stale pull request message' 27 | stale-issue-label: 'no-issue-activity' 28 | stale-pr-label: 'no-pr-activity' 29 | -------------------------------------------------------------------------------- /.github/workflows/tests.yml: -------------------------------------------------------------------------------- 1 | name: tests 2 | 3 | on: [ workflow_dispatch, push, pull_request ] 4 | 5 | jobs: 6 | test: 7 | runs-on: ${{ matrix.os }} 8 | strategy: 9 | fail-fast: false 10 | matrix: 11 | os: [ ubuntu-latest ] 12 | php: [ 8.4 ] 13 | dependency-version: [ prefer-stable ] 14 | 15 | name: P${{ matrix.php }} - ${{ matrix.dependency-version }} - ${{ matrix.os }} 16 | 17 | steps: 18 | - name: Checkout code 19 | uses: actions/checkout@v4 20 | 21 | - name: Cache dependencies 22 | uses: actions/cache@v4 23 | with: 24 | path: ~/.composer/cache/files 25 | key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} 26 | 27 | - name: Setup PHP 28 | uses: shivammathur/setup-php@v2 29 | with: 30 | php-version: ${{ matrix.php }} 31 | extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick 32 | coverage: xdebug 33 | 34 | - name: Install dependencies 35 | run: composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --ansi -v 36 | 37 | - name: Execute tests 38 | run: composer test-coverage 39 | 40 | - name: Upload coverage to Codecov 41 | uses: codecov/codecov-action@v5 42 | with: 43 | files: ./.build/phpunit/clover.xml" 44 | token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos 45 | fail_ci_if_error: false # optional (default = false) 46 | verbose: true # optional (default = false) 47 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | .php_cs 3 | .phplint-cache 4 | .php_cs.cache 5 | .php-cs-fixer.cache 6 | .phpunit.result.cache 7 | .build/ 8 | #composer.lock 9 | coverage/ 10 | clover.xml 11 | phpunit.xml 12 | psalm.xml 13 | vendor/ 14 | tests.php 15 | .DS_Store 16 | .history/ 17 | node_modules/ 18 | package-lock.json 19 | .ai-commit.json 20 | /eza.png 21 | /tests.* 22 | -------------------------------------------------------------------------------- /.lintmdrc: -------------------------------------------------------------------------------- 1 | { 2 | "excludeFiles": [ 3 | ".build/", 4 | "app/", 5 | "bootstrap/", 6 | "config/", 7 | "tests/", 8 | "vendor/", 9 | "vendor-bin/" 10 | ], 11 | "rules": { 12 | "space-around-alphabet": 2, 13 | "space-around-number": 2, 14 | "no-empty-code-lang": 2, 15 | "no-empty-url": 2, 16 | "no-empty-list": 2, 17 | "no-empty-code": 2, 18 | "no-empty-inline-code": 2, 19 | "no-empty-blockquote": 2, 20 | "no-special-characters": 2, 21 | "use-standard-ellipsis": 2, 22 | "no-fullwidth-number": 2, 23 | "no-space-in-link": 2, 24 | "no-multiple-space-blockquote": 2, 25 | "correct-title-trailing-punctuation": 2, 26 | "no-space-in-inline-code": 2, 27 | "no-long-code": [ 28 | 0, 29 | { 30 | "length": 200, 31 | "exclude": [ 32 | "dot" 33 | ] 34 | } 35 | ] 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /.php-cs-fixer.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view 9 | * the LICENSE file that was distributed with this source code. 10 | * 11 | * @see https://github.com/guanguans/favorite-link 12 | */ 13 | 14 | use Ergebnis\License\Holder; 15 | use Ergebnis\License\Range; 16 | use Ergebnis\License\Type\MIT; 17 | use Ergebnis\License\Url; 18 | use Ergebnis\License\Year; 19 | use Ergebnis\PhpCsFixer\Config\Factory; 20 | use Ergebnis\PhpCsFixer\Config\Fixers; 21 | use Ergebnis\PhpCsFixer\Config\Rules; 22 | use Ergebnis\PhpCsFixer\Config\RuleSet\Php84; 23 | use PhpCsFixer\Finder; 24 | use PhpCsFixer\Fixer\DeprecatedFixerInterface; 25 | use PhpCsFixerCustomFixers\Fixer\AbstractFixer; 26 | 27 | $license = MIT::text( 28 | __DIR__.'/LICENSE', 29 | Range::since( 30 | Year::fromString('2018'), 31 | new DateTimeZone('Asia/Shanghai'), 32 | ), 33 | Holder::fromString('guanguans'), 34 | Url::fromString('https://github.com/guanguans/favorite-link'), 35 | ); 36 | 37 | // $license->save(); 38 | 39 | $ruleSet = Php84::create() 40 | ->withHeader($license->header()) 41 | ->withRules(Rules::fromArray([ 42 | '@PHP70Migration' => true, 43 | '@PHP70Migration:risky' => true, 44 | '@PHP71Migration' => true, 45 | '@PHP71Migration:risky' => true, 46 | '@PHP73Migration' => true, 47 | '@PHP74Migration' => true, 48 | '@PHP74Migration:risky' => true, 49 | '@PHP80Migration' => true, 50 | '@PHP80Migration:risky' => true, 51 | '@PHP81Migration' => true, 52 | '@PHP82Migration' => true, 53 | '@PHP83Migration' => true, 54 | '@PHP84Migration' => true, 55 | // '@PHPUnit75Migration:risky' => true, 56 | // '@PHPUnit84Migration:risky' => true, 57 | // '@PHPUnit100Migration:risky' => true, 58 | // '@DoctrineAnnotation' => true, 59 | // '@PhpCsFixer' => true, 60 | // '@PhpCsFixer:risky' => true, 61 | 'align_multiline_comment' => [ 62 | 'comment_type' => 'phpdocs_only', 63 | ], 64 | 'attribute_empty_parentheses' => [ 65 | 'use_parentheses' => false, 66 | ], 67 | 'blank_line_before_statement' => [ 68 | 'statements' => [ 69 | 'break', 70 | // 'case', 71 | 'continue', 72 | 'declare', 73 | // 'default', 74 | 'do', 75 | 'exit', 76 | 'for', 77 | 'foreach', 78 | 'goto', 79 | 'if', 80 | 'include', 81 | 'include_once', 82 | 'phpdoc', 83 | 'require', 84 | 'require_once', 85 | 'return', 86 | 'switch', 87 | 'throw', 88 | 'try', 89 | 'while', 90 | 'yield', 91 | 'yield_from', 92 | ], 93 | ], 94 | 'class_definition' => [ 95 | 'inline_constructor_arguments' => false, 96 | 'multi_line_extends_each_single_line' => false, 97 | 'single_item_single_line' => false, 98 | 'single_line' => false, 99 | 'space_before_parenthesis' => false, 100 | ], 101 | 'concat_space' => [ 102 | 'spacing' => 'none', 103 | ], 104 | // 'empty_loop_condition' => [ 105 | // 'style' => 'for', 106 | // ], 107 | 'explicit_string_variable' => false, 108 | 'final_class' => false, 109 | // 'final_internal_class' => false, 110 | // 'final_public_method_for_abstract_class' => false, 111 | 'fully_qualified_strict_types' => [ 112 | 'import_symbols' => false, 113 | 'leading_backslash_in_global_namespace' => false, 114 | 'phpdoc_tags' => [ 115 | // 'param', 116 | // 'phpstan-param', 117 | // 'phpstan-property', 118 | // 'phpstan-property-read', 119 | // 'phpstan-property-write', 120 | // 'phpstan-return', 121 | // 'phpstan-var', 122 | // 'property', 123 | // 'property-read', 124 | // 'property-write', 125 | // 'psalm-param', 126 | // 'psalm-property', 127 | // 'psalm-property-read', 128 | // 'psalm-property-write', 129 | // 'psalm-return', 130 | // 'psalm-var', 131 | // 'return', 132 | // 'see', 133 | // 'throws', 134 | // 'var', 135 | ], 136 | ], 137 | 'logical_operators' => false, 138 | 'mb_str_functions' => false, 139 | 'native_function_invocation' => [ 140 | 'exclude' => [], 141 | 'include' => ['@compiler_optimized', 'is_scalar'], 142 | 'scope' => 'all', 143 | 'strict' => true, 144 | ], 145 | 'new_with_parentheses' => [ 146 | 'anonymous_class' => false, 147 | 'named_class' => false, 148 | ], 149 | 'ordered_traits' => [ 150 | 'case_sensitive' => true, 151 | ], 152 | 'php_unit_data_provider_name' => [ 153 | 'prefix' => 'provide', 154 | 'suffix' => 'Cases', 155 | ], 156 | 'phpdoc_align' => [ 157 | 'align' => 'left', 158 | 'spacing' => 1, 159 | 'tags' => [ 160 | 'method', 161 | 'param', 162 | 'property', 163 | 'property-read', 164 | 'property-write', 165 | 'return', 166 | 'throws', 167 | 'type', 168 | 'var', 169 | ], 170 | ], 171 | 'phpdoc_line_span' => [ 172 | 'const' => 'single', 173 | 'method' => 'multi', 174 | 'property' => 'single', 175 | ], 176 | 'phpdoc_no_alias_tag' => [ 177 | 'replacements' => [ 178 | 'link' => 'see', 179 | 'type' => 'var', 180 | ], 181 | ], 182 | 'phpdoc_order' => [ 183 | 'order' => [ 184 | 'noinspection', 185 | 'phan-suppress', 186 | 'phpcsSuppress', 187 | 'phpstan-ignore', 188 | 'psalm-suppress', 189 | 190 | 'deprecated', 191 | 'internal', 192 | 'covers', 193 | 'uses', 194 | 'dataProvider', 195 | 'param', 196 | 'throws', 197 | 'return', 198 | ], 199 | ], 200 | 'phpdoc_to_param_type' => [ 201 | 'scalar_types' => true, 202 | 'types_map' => [], 203 | 'union_types' => true, 204 | ], 205 | 'phpdoc_to_property_type' => false, 206 | 'phpdoc_to_return_type' => [ 207 | 'scalar_types' => true, 208 | 'types_map' => [], 209 | 'union_types' => true, 210 | ], 211 | 'simplified_if_return' => true, 212 | 'simplified_null_return' => true, 213 | 'single_line_empty_body' => true, 214 | 'statement_indentation' => [ 215 | 'stick_comment_to_next_continuous_control_statement' => true, 216 | ], 217 | 'static_lambda' => false, // pest 218 | ])); 219 | 220 | $ruleSet->withCustomFixers(Fixers::fromFixers( 221 | ...array_filter( 222 | iterator_to_array(new PhpCsFixerCustomFixers\Fixers), 223 | static fn (AbstractFixer $fixer): bool => !$fixer instanceof DeprecatedFixerInterface 224 | && !\array_key_exists($fixer->getName(), $ruleSet->rules()->toArray()) 225 | ) 226 | )); 227 | 228 | return Factory::fromRuleSet($ruleSet) 229 | ->setFinder( 230 | Finder::create() 231 | ->in([ 232 | __DIR__.'/app', 233 | __DIR__.'/bootstrap', 234 | __DIR__.'/config', 235 | __DIR__.'/tests', 236 | ]) 237 | ->exclude([ 238 | '__snapshots__', 239 | 'Fixtures', 240 | ]) 241 | ->append([ 242 | ...array_filter( 243 | glob(__DIR__.'/{*,.*}.php', \GLOB_BRACE), 244 | static fn (string $filename): bool => !\in_array($filename, [ 245 | __DIR__.'/.phpstorm.meta.php', 246 | // __DIR__.'/_ide_helper.php', 247 | __DIR__.'/_ide_helper_models.php', 248 | ], true) 249 | ), 250 | __DIR__.'/composer-updater', 251 | __DIR__.'/favorite-link', 252 | ]) 253 | ) 254 | ->setRiskyAllowed(true) 255 | ->setUsingCache(true) 256 | ->setCacheFile(__DIR__.'/.build/php-cs-fixer/.php-cs-fixer.cache'); 257 | -------------------------------------------------------------------------------- /.zhlintrc: -------------------------------------------------------------------------------- 1 | { 2 | "preset": "default", 3 | "rules": { 4 | "fullwidthPunctuation": "", 5 | "adjustedFullwidthPunctuation": "", 6 | "noSinglePair": false 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # favorite-link 2 | 3 | > ❤️ 每天收集喜欢的开源项目。欢迎推荐。 4 | 5 | [![feed](https://github.com/guanguans/favorite-link/actions/workflows/feed.yml/badge.svg)](https://github.com/guanguans/favorite-link/actions/workflows/feed.yml) 6 | [![mirror](https://github.com/guanguans/favorite-link/actions/workflows/mirror.yml/badge.svg)](https://github.com/guanguans/favorite-link/actions/workflows/mirror.yml) 7 | 8 | | github | gitlab | 9 | |---------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------| 10 | | [README.rss](https://raw.githubusercontent.com/guanguans/favorite-link/master/README.rss) | [README.rss](https://gitlab.com/yzmguanguan/favorite-link/-/raw/master/README.rss) | 11 | | [README.atom](https://raw.githubusercontent.com/guanguans/favorite-link/master/README.atom) | [README.atom](https://gitlab.com/yzmguanguan/favorite-link/-/raw/master/README.atom) | 12 | 13 | 14 | 15 | ### June 1, 2025 16 | - [boson-php/boson: ⚡ 使用 PHP、JavaScript、HTML 和 CSS 构建跨平台桌面应用程序](https://github.com/boson-php/boson) 17 | - [rybbit-io/rybbit: 🐸 开源且注重隐私的 Google Analytics 替代方案,直观性提升了 10 倍。](https://github.com/rybbit-io/rybbit) 18 | - [devrabiul/livewire-doctor: 您的 Laravel Livewire 智能助手。检测并自动修复诸如缺失的资源、不正确的指令和过时的组件等问题。](https://github.com/devrabiul/livewire-doctor) 19 | - [pdphilip/elasticlens: 为您的 SQL 模型提供全文 Elasticsearch 支持](https://github.com/pdphilip/elasticlens) 20 | - [platformatic/php-node: 用于 Node.js 的 PHP HTTP 请求处理程序](https://github.com/platformatic/php-node?lidx=21&wpid=571885&mkt_tok=NDI2LVFWRC0xMTQAAAGawQDAtxDzY-dDEmNiNUN8QmXVeaXWQNcyU4xGyP7eUj6EPbgYUvSlj5gzs2FF8tNKopMLc7xGwILwXQVrh47J0YELpODJV4dIGgx2b2u_j_zOytXI) 21 | - [PHP-WebRTC/webrtc: 纯 PHP 实现的 WebRTC](https://github.com/PHP-WebRTC/webrtc) 22 | - [yiisoft/injector: 基于自动连接和兼容 PSR-11 的依赖注入容器的依赖注入实现。](https://github.com/yiisoft/injector/) 23 | - [dereuromark/composer-prefer-lowest: 检查 composer.json 中实际定义的最小版本是否为 prefer-lowest 安装](https://github.com/dereuromark/composer-prefer-lowest) 24 | - [inspector-apm/neuron-ai: 在任何 PHP 应用程序中创建作为独立组件的全功能 AI 代理](https://github.com/inspector-apm/neuron-ai?lidx=66&wpid=571885&mkt_tok=NDI2LVFWRC0xMTQAAAGawQDAtljYAkx1aEXlEmRSsbQhzduZKNJvJR1wBhSOtFCPi2juIfHWoMPYR7xJDMyLrfUKuei_UpIfTNMIKaOG1_m9PYm7i79cGFEIDPheojyCsXTM) 25 | - [Capevace/laravel-introspect: 像查询数据库一样查询您的 Laravel 代码库,使用类似 Eloquent 的 API](https://github.com/capevace/laravel-introspect?lidx=78&wpid=571885&mkt_tok=NDI2LVFWRC0xMTQAAAGawQDAtVt0pi36cglTxP3LNtKscg4WDn_WIKbKlmUsee-tOT_Bwigl2PYE-GBcn_nXqsaUnb7NeluIa1m-LkDUl1PLdGO0xTsAWufBgIQ5jX8i3k-i) 26 | - [fdomgjoni99/laravel-ai-factory: Laravel AI Factory 是一个开发者友好的包,用于使用 AI 模型生成逼真的测试数据。它与 Laravel 工厂无缝集成,并支持 AI 生成和手动定义的字段,可以选择批量或单个插入。](https://github.com/fdomgjoni99/laravel-ai-factory) 27 | ### May 30, 2025 28 | - [Ponderfly/GoogleTranslateIpCheck: 扫描国内可用的谷歌翻译 IP](https://github.com/Ponderfly/GoogleTranslateIpCheck) 29 | - [pb30/phpstan-composer-analysis: 用于 Composer 依赖性分析的 PHPStan 封装程序](https://github.com/pb30/phpstan-composer-analysis) 30 | - [runs-on/runs-on: 自托管的 GitHub Actions 运行器变得简单。适用于 AWS。成本降低 10 倍,速度快 30%,并提供无限缓存。Actions Runner Controller 的最佳替代方案。](https://github.com/runs-on/runs-on) 31 | ### May 29, 2025 32 | - [modelcontextprotocol/servers: 模型上下文协议服务器](https://github.com/modelcontextprotocol/servers) 33 | - [johnste/finicky: 一款用于自定义启动哪个浏览器的 macOS 应用程序](https://github.com/johnste/finicky) 34 | ### May 27, 2025 35 | - [SpaceTimee/Sheas-Cealer-Droid: Ceal It (可用于无代理合法抵御网络监听和开展网络研究)](https://github.com/SpaceTimee/Sheas-Cealer-Droid) 36 | ### May 26, 2025 37 | - [zdharma-continuum/zinit: 🌻 灵活且快速的 ZSH 插件管理器](https://github.com/zdharma-continuum/zinit) 38 | ### May 25, 2025 39 | - [nunomaduro/pokio: Pokio 是一个非常简单的 PHP 异步 API。](https://github.com/nunomaduro/pokio) 40 | - [olvlvl/composer-attribute-collector: composer-attribute-collector 是一个用于 Composer 的插件。它的目标是以一种方便且几乎零成本的方式检索 PHP 8 属性的目标。在自动加载器被转储后,该插件会收集属性目标并生成一个静态文件。这些目标可以通过一个方便的接口检索,而无需使用反射。当您需要在代码库中发现属性目标时,该插件非常有用——对于已知的目标,您可以使用反射。](https://github.com/olvlvl/composer-attribute-collector) 41 | ### May 22, 2025 42 | - [一个 Laravel 包,可以轻松处理翻译文本,并通过 AI 或任何翻译服务进行翻译](https://github.com/edulazaro/laratext) 43 | - [edulazaro/laratext: 一个 Laravel 包,可以轻松处理翻译文本,并通过 AI 或任何翻译服务进行翻译](https://github.com/edulazaro/laratext) 44 | - [WINBIGFOX/TimeScribe: 此存储库提供了一款现代化、灵活的时间跟踪应用程序,用于记录和管理个人工作时间。它可离线运行,无需注册,且完全免费和开源——非常适合希望高效跟踪工作时间的人,无论是在家还是在办公室。](https://github.com/WINBIGFOX/TimeScribe) 45 | ### May 18, 2025 46 | - [XiCheng148/Dockit: 一个可以将任何窗口固定到屏幕边缘的应用程序。](https://github.com/XiCheng148/Dockit) 47 | - [wenyuanw/quick-prompt: ✨ 提示词管理与快速输入浏览器扩展](https://github.com/wenyuanw/quick-prompt) 48 | - [git-bug/git-bug: 分布式、离线优先的嵌入在 Git 中的错误跟踪器](https://github.com/git-bug/git-bug) 49 | - [taubyte/tau: 开源的分布式平台即服务 (PaaS)。一个自托管的 Vercel / Netlify / Cloudflare 替代方案。](https://github.com/taubyte/tau) 50 | - [JefferyHcool/BiliNote: AI 视频笔记生成工具让 AI 为你的视频做笔记](https://github.com/JefferyHcool/BiliNote) 51 | - [ultrazg/xyz: 小宇宙 FM API](https://github.com/ultrazg/xyz) 52 | - [ultrazg/xyz: 小宇宙 FM API](https://github.com/ultrazg/xyz) 53 | ### May 16, 2025 54 | - [happycola233/tchMaterial-parser: 国家中小学智慧教育平台电子课本下载工具,帮助您从智慧教育平台中获取电子课本的 PDF 文件网址并进行下载,让您更方便地获取课本内容。](https://github.com/happycola233/tchMaterial-parser) 55 | ### May 15, 2025 56 | - [webriots/rate: 一个高性能的速率限制库,适用于具有多种速率限制策略的 Go 应用程序。](https://github.com/webriots/rate) 57 | ### May 13, 2025 58 | - [juampi92/api-resources: 管理您的 Laravel Eloquent 资源,维护 API 版本](https://github.com/juampi92/api-resources) 59 | - [TapXWorld/ChinaTextbook: 所有小初高、大学 PDF 教材。](https://github.com/TapXWorld/ChinaTextbook) 60 | - [symfony-tools/carsonbot: Carson 是目前运行在 symfony/symfony 仓库上的一个机器人。它的工作是帮助自动执行不同的问题和拉取请求工作流程。](https://github.com/symfony-tools/carsonbot) 61 | ### May 12, 2025 62 | - [asantibanez/laravel-eloquent-state-machines: Laravel Eloquent 模型的状态机](https://github.com/asantibanez/laravel-eloquent-state-machines) 63 | ### May 11, 2025 64 | - [Intermax-Cloudsourcing/veil: Veil 是一个软件包,可帮助管理 Laravel 或 Laravel Zero 应用程序中的加密环境。它向 Laravel 加密环境命令添加了一个标志。](https://github.com/Intermax-Cloudsourcing/veil?utm_source=laravelnews&utm_medium=link&utm_campaign=laravelnews) 65 | - [PHP 操作符](https://php-operators.com/operators/binary-and) 66 | - [spatie/php-operators.com: PHP 运算符的交互式列表](https://github.com/spatie/php-operators.com) 67 | - [orchestral/sidekick: Laravel 的 Packages Toolkit Utilities 和 Helpers](https://github.com/orchestral/sidekick) 68 | - [fmhy/edit: 互联网上最大的免费资料库!](https://github.com/fmhy/edit) 69 | ### May 9, 2025 70 | - [curlconverter/curlconverter: 将 curl 命令转译为 Python、JavaScript 和其他 27 种语言](https://github.com/curlconverter/curlconverter) 71 | ### May 8, 2025 72 | - [uxiaohan/PayQrcode: 最新物理合并微信收款码和支付宝收款码为聚合二维码 👍](https://github.com/uxiaohan/PayQrcode) 73 | - [sansecio/composer-integrity-plugin:一个检查您已安装的 composer 包与已知正确校验和列表的 composer 插件。](https://github.com/sansecio/composer-integrity-plugin) 74 | ### May 5, 2025 75 | - [YorCreative/Laravel-Argonaut-DTO: Argonaut 是适用于 Laravel 的轻量级数据传输对象 (DTO) 包,支持嵌套铸造、递归序列化和开箱即验证。它是服务层、API 和简洁架构工作流的理想选择。](https://github.com/YorCreative/Laravel-Argonaut-DTO) 76 | ### May 4, 2025 77 | - [crystalidea/macs-fan-control: 控制苹果电脑上的风扇](https://github.com/crystalidea/macs-fan-control) 78 | - [runjuu/InputSourcePro: Input Source Pro 是一款免费的开源 macOS 实用程序,专为经常切换输入法的多语言用户而设计。它根据活动应用程序 (甚至您正在浏览的特定网站) 自动切换输入源,从而显著提高您的工作效率和打字体验。](https://github.com/runjuu/InputSourcePro) 79 | - [wfxr/forgit: 💤 由 fzf 提供支持的实用工具,用于交互式使用 git。](https://github.com/wfxr/forgit) 80 | ### May 3, 2025 81 | - [tidwall/jj: JSON 流编辑器 (命令行实用程序)](https://github.com/tidwall/jj) 82 | ### May 1, 2025 83 | - [Laragear/Populate: 使用增压的连续播种机填充您的数据库。](https://github.com/Laragear/Populate) 84 | ### April 30, 2025 85 | - [php-fig/cache-util: 这个软件包提供了一系列特征和基本类,以便快速实现符合 PSR-6 标准的缓存库。](https://github.com/php-fig/cache-util) 86 | - [TheDragonCode/laravel-route-names: 为您的项目自动生成路由名称](https://github.com/TheDragonCode/laravel-route-names) 87 | ### April 29, 2025 88 | - [mikinw/TabMover: IntelliJ Idea 插件,您可以使用它移动和重新排列 Editor 选项卡 (甚至在多个显示器上的不同 IntelliJ 窗口之间)。](https://github.com/mikinw/TabMover) 89 | ### April 27, 2025 90 | - [JetBrains/mcp-jetbrains: 与 JetBrains IDE 配合使用的模型上下文协议服务器:IntelliJ、PyCharm、WebStorm 等。](https://github.com/JetBrains/mcp-jetbrains) 91 | ### April 26, 2025 92 | - [opencode-ai/opencode: 面向开发者的强大终端 AI 助手,直接在您的终端中提供智能编码辅助。](https://github.com/opencode-ai/opencode) 93 | ### April 25, 2025 94 | - [infinitypaul/idempotency-laravel: 一个生产就绪的 Laravel 中间件,用于在 API 请求中实现幂等性。安全地重试 API 调用,而无需担心重复处理。](https://github.com/infinitypaul/idempotency-laravel) 95 | - [swiss-devjoy/laravel-optimize-sqlite: 优化 SQLite 数据库以在 Laravel 中进行生产](https://github.com/swiss-devjoy/laravel-optimize-sqlite) 96 | ### April 24, 2025 97 | - [SanderSander/composer-link: 添加了在 Composer 中链接本地包以进行开发的功能。](https://github.com/SanderSander/composer-link) 98 | - [x1xhlol/system-prompts-and-models-of-ai-tools: FULL v0, Cursor, Manus, Same.dev, Lovable, Devin, Replit Agent, Windsurf Agent & VSCode Agent (And other Open Sourced) System Prompts, Tools & AI Models. FULL v0,Cursor,Manus,Same.dev,Lovable,Devin,Replit Agent,Windsurf Agent & VSCode Agent (以及其他开源的) 系统提示、工具和 AI 模型。](https://github.com/x1xhlol/system-prompts-and-models-of-ai-tools) 99 | ### April 21, 2025 100 | - [astral-data/php-serialize: 一种高级 PHP 序列化工具,利用属性实现灵活的对象到数组和 JSON 转换。支持属性别名、类型转换和嵌套对象处理。非常适合 API、数据持久性和配置管理。](https://github.com/astral-data/php-serialize/tree/master) 101 | ### April 20, 2025 102 | - [keepalivedev/KeepAlive: 这款 Android 应用程序可在您一定时间内未使用设备时通知他人。](https://github.com/keepalivedev/KeepAlive) 103 | - [elastic/elastic-transport-php: Elastic PHP 客户端的 HTTP 传输方式](https://github.com/elastic/elastic-transport-php) 104 | - [r3labs/sse: 服务器发送事件 Golang 的服务器和客户端](https://github.com/r3labs/sse) 105 | - [rectorphp/jack: Jack 可帮助您逐步更新依赖项,确保您的项目保持最新状态,而不会出现过时包的混乱。](https://github.com/rectorphp/jack) 106 | ### April 19, 2025 107 | - [morrislaptop/laravel-popo-caster: 使用 Symfony 的序列化器在 Laravel 中自动将 JSON 列转换为丰富的 PHP 对象](https://github.com/morrislaptop/laravel-popo-caster) 108 | ### April 16, 2025 109 | - [tnylea/php-ext: 一个 chrome 扩展,用于显示 PHP (Laravel) devtools 控制台](https://github.com/tnylea/php-ext) 110 | ### April 15, 2025 111 | - [PHP 中的协变和逆变](https://ashallendesign.co.uk/blog/covariance-and-contravariance-in-php) 112 | - [toramanlis/laravel-implicit-migrations: 此包是一个工具,它通过检查应用程序的模型来创建 Laravel 迁移文件。](https://github.com/toramanlis/laravel-implicit-migrations) 113 | ### April 12, 2025 114 | - [Lawondyss/Parex: 轻量级 PHP 库,用于使用 PHP 本机选项处理解析终端命令](https://github.com/Lawondyss/Parex) 115 | - [datacreativa/laravel-presentable: 为 Eloquent 模型创建演示者](https://github.com/datacreativa/laravel-presentable) 116 | ### April 11, 2025 117 | - [Dolov/chrome-QuickGo: 🚀 QuickGo 外链直达 — 无感知自动跳过知乎、简书、掘金、CSDN、少数派、Gitee 等 50+ 网站的安全中心跳转限制](https://github.com/Dolov/chrome-QuickGo) 118 | - [spatie/laravel-one-time-passwords: 使用一次性密码 (OTP) 在您的 Laravel 应用程序中进行身份验证](https://github.com/spatie/laravel-one-time-passwords) 119 | - [linshenkx/prompt-optimizer: 一款提示词优化器,助力于编写高质量的提示词](https://github.com/linshenkx/prompt-optimizer) 120 | ### April 10, 2025 121 | - [modernben/iptracker: 桌面工具,用于跟踪您的 IP 地址并在 IP 地址发生变化时向您更新](https://github.com/modernben/iptracker) 122 | - [Laravel 12.8 中的自动关系加载](https://laravel-news.com/laravel-12-8-0) 123 | - [Blaspsoft/onym: 📂 🎨 一个灵活的 Laravel 包,用于使用各种策略生成结构化、唯一且可自定义的文件名。](https://github.com/Blaspsoft/onym) 124 | - [WhispPHP/whisp: 纯 PHP SSH 服务器 - 构建 PHP SSH 应用程序的最简单方法](https://github.com/whispphp/whisp) 125 | - [omaressaouaf/query-builder-criteria: 定义可重用的查询条件,用于筛选、排序、搜索、字段选择,并包含在 Laravel Eloquent 模型中](https://github.com/omaressaouaf/query-builder-criteria) 126 | - [giacomomasseron/laravel-models-generator: 从现有数据库生成 Laravel 模型](https://github.com/giacomomasseron/laravel-models-generator) 127 | ### April 9, 2025 128 | - [ajaxray/laravel-server-sync: 轻松将服务器 (生产/暂存) 数据库和文件同步到本地环境](https://github.com/ajaxray/laravel-server-sync?utm_source=laravelnews&utm_medium=link&utm_campaign=laravelnews) 129 | - [lharries/whatsapp-mcp: WhatsApp MCP 服务器](https://github.com/lharries/whatsapp-mcp) 130 | - [github/github-mcp-server: GitHub 官方 MCP 服务器](https://github.com/github/github-mcp-server) 131 | - [prism-php/relay: 适用于 Prism 的 MCP 客户端工具](https://github.com/prism-php/relay) 132 | - [mohamedahmed01/laravel-mcp-sdk: 基于 Laravel 的模型上下文协议实现](https://github.com/mohamedahmed01/laravel-mcp-sdk) 133 | ### April 8, 2025 134 | - [JaguarJack/packvault: PHP Composer 私有包管理,支持发放 License。](https://github.com/JaguarJack/packvault) 135 | ### April 7, 2025 136 | - [antfu/refined-github-last-read: 显示 GitHub 中问题和拉取请求的最后读取位置。](https://github.com/antfu/refined-github-last-read) 137 | - [antfu/refined-github-notifications: 增强 GitHub 通知页面,使其更高效、更安静。](https://github.com/antfu/refined-github-notifications) 138 | - [antfu/changelogithub: 从 Conventional Commits 为 GitHub 版本生成更改日志,由 changelogen 提供支持。](https://github.com/antfu/changelogithub) 139 | - [antfu/userscript-open-in-codeflow: 添加一个按钮以在 GitHub 的 Codeflow 中打开 repo/issue/PR](https://github.com/antfu/userscript-open-in-codeflow) 140 | ### April 5, 2025 141 | - [wstool/wst: 一个为促进网络服务的部署和测试而开发的综合实用程序,尽管其最初的重点是满足 PHP-FPM 测试需求。](https://github.com/wstool/wst) 142 | ### April 4, 2025 143 | - [BuilderIO/gpt-crawler: 抓取网站以生成知识文件,以从 URL 创建您自己的自定义 GPT](https://github.com/BuilderIO/gpt-crawler) 144 | ### March 31, 2025 145 | - [avito-tech/go-mutesting: go-mutesting 是一个对 Go 源代码执行突变测试的框架。它的主要目的是找到未被任何测试覆盖的源代码。](https://github.com/avito-tech/go-mutesting) 146 | - [torchlight-api/engine: Torchlight 使您能够向代码添加注释,将读者的注意力吸引到特定部分、突出显示行、可视化差异等等。结合 Phiki 提供的语法高亮显示,Torchlight 非常适合技术博客、文档等。](https://github.com/torchlight-api/engine) 147 | ### March 29, 2025 148 | - [genericmilk/docudoodle: 这是 Docudoodle!👋 PHP 文档生成器,用于分析您的代码库并使用 AI 创建全面的文档。](https://github.com/genericmilk/docudoodle) 149 | - [soloterm/dumps: 从 Laravel 应用程序截取转储的 Laravel 命令。](https://github.com/soloterm/dumps) 150 | - [justbetter/laravel-unique-values: 生成支持并发的唯一值](https://github.com/justbetter/laravel-unique-values) 151 | ### March 21, 2025 152 | - [sinclairtarget/git-who: Git 查看文件树的修改责任人](https://github.com/sinclairtarget/git-who) 153 | - [sajya/client: 此软件包允许您通过 HTTP (S) 设置 JSON-RPC 客户端,并使用 PHP 代码发出请求。围绕 Laravel (不需要整个框架,只需要其组件) 富有表现力的 HTTP 包装器构建,它允许您自定义授权、重试等内容。](https://github.com/sajya/client) 154 | - [phpacker/phpacker: 将任何 PHP 脚本或 PHAR 打包到独立的跨平台可执行文件中](https://github.com/phpacker/phpacker) 155 | - [Intervention/zodiac: PHP 星座计算器](https://github.com/Intervention/zodiac) 156 | ### March 19, 2025 157 | - [scify/laravel-cookie-guard: 一个 Laravel 包,它提供 Cookie 同意浮动窗口并发布不同同意类别的 Cookie](https://github.com/scify/laravel-cookie-guard) 158 | - [JonPurvis/squeaky: Laravel 验证规则有助于在您的应用程序中捕捉脏话。](https://github.com/JonPurvis/squeaky) 159 | ### March 17, 2025 160 | - [logiscape/mcp-sdk-php: 适用于 PHP 的模型上下文协议 SDK](https://github.com/logiscape/mcp-sdk-php) 161 | ### March 16, 2025 162 | - [package-wizard/installer: Package Wizard 是一个使用 CLI 工具创建新包的库](https://github.com/package-wizard/installer) 163 | - [xykt/NetQuality: 用于网络质量检测的脚本](https://github.com/xykt/NetQuality) 164 | - [huacnlee/autocorrect: 一个 linter 和格式化程序,可帮助您改进文案写作,更正 CJK (中文、日语、韩语) 之间的空格、单词和标点符号。](https://github.com/huacnlee/autocorrect) 165 | ### March 15, 2025 166 | - [JoeyMckenzie/nasastan: PHPStan 扩展,用于在您的 PHP 代码中强制执行 NASA 的 Power of Ten。](https://github.com/JoeyMckenzie/nasastan) 167 | - [JetBrains/xdebug-extension: 一个现代的、无依赖的、跨浏览器的 Xdebug 扩展。](https://github.com/JetBrains/xdebug-extension) 168 | ### March 13, 2025 169 | - [satnaing/astro-paper: 一个最小、可访问且对 SEO 友好的 Astro 博客主题](https://github.com/satnaing/astro-paper) 170 | - [danjohnson95/pinout: 使用 Pinout 将您的 Laravel 应用程序连接到物理世界,代码与电路在这里相遇。硬件和 Web 无缝结合 🤝](https://github.com/danjohnson95/pinout) 171 | - [Blaspsoft/doxswap: 📄 🔄 Doxswap 是一个 Laravel 包,用于使用 LibreOffice 进行无缝文档转换。使用简单、优雅的 API 轻松转换 DOCX、PDF、ODT 等。支持 Laravel 存储、可配置设置和安全文件处理。](https://github.com/Blaspsoft/doxswap) 172 | ### March 12, 2025 173 | - [qfcy/PyStackSnapshot: 一个在发生异常时,自动捕获异常发生时的完整栈帧,包括局部、全局变量的库。](https://github.com/qfcy/PyStackSnapshot) 174 | - [go-task/task: 用 Go 编写的任务运行程序/更简单的 Make 替代程序](https://github.com/go-task/task) 175 | - [x-falcon/Virtual-Hosts: 安卓主机,通过 vpn 模式实施,支持通配符 DNS 记录](https://github.com/x-falcon/Virtual-Hosts) 176 | ### March 11, 2025 177 | - [mrmarchone/laravel-auto-crud: Laravel Auto CRUD Generator 是一个软件包,可简化 Laravel 应用程序的 CRUD (创建、读取、更新、删除) 作。只需一个命令,您就可以为所选模型生成所有必要的文件和逻辑,从而减少开发时间和工作量。](https://github.com/mrmarchone/laravel-auto-crud) 178 | ### March 8, 2025 179 | - [xxnuo/MTranServer: 低占用速度快可私有部署的自由版 Google 翻译](https://github.com/xxnuo/MTranServer) 180 | ### March 7, 2025 181 | - [beyondcode/laravel-masked-db-dump: 从数据库中转储掩码信息](https://github.com/beyondcode/laravel-masked-db-dump) 182 | - [hkdobrev/cleanmac: 使用脚本清理 macOS,而不是昂贵的应用程序](https://github.com/hkdobrev/cleanmac) 183 | ### March 4, 2025 184 | - [archtechx/laravel-seo: Laravel 的 SEO 软件包](https://github.com/archtechx/laravel-seo) 185 | - [jaxon-php/jaxon-config: 将配置选项保存在不可变对象中](https://github.com/jaxon-php/jaxon-config) 186 | - [jaxon-php/jaxon-core: Jaxon 是一个开源 PHP 库,用于轻松创建 Ajax Web 应用程序。它允许网页直接对 PHP 类进行 Ajax 调用,这些类将依次更新其内容,而无需重新加载整个页面。](https://github.com/jaxon-php/jaxon-core) 187 | - [hexadog/laravel-themes-manager: 功能齐全的主题管理器可为您的 Laravel 应用程序提供多主题支持](https://github.com/hexadog/laravel-themes-manager) 188 | - [grosv/laravel-passwordless-login: 一个简单、安全的 Laravel 魔术登录链接生成器](https://github.com/grosv/laravel-passwordless-login) 189 | ### March 3, 2025 190 | - [tonysm/importmap-laravel: 将 ESM 与导入映射结合使用,无需转译或捆绑即可在 Laravel 中管理现代 JavaScript。](https://github.com/tonysm/importmap-laravel) 191 | ### March 2, 2025 192 | - [juliomotol/laravel-auth-timeout: Laravel 的身份验证超时](https://github.com/juliomotol/laravel-auth-timeout) 193 | - [juliomotol/lapiv: 轻松实现 Laravel 的 API 版本管理](https://github.com/juliomotol/lapiv) 194 | ### March 1, 2025 195 | - [richan-fongdasen/eloquent-blameable: Laravel 中 Eloquent 模型的可责备行为实现](https://github.com/richan-fongdasen/eloquent-blameable) 196 | - [使用 Laravel 的 afterQuery 方法优雅地对查询结果进行后处理](https://www.harrisrafto.eu/post-process-query-results-elegantly-with-laravels-afterquery-method/) 197 | - [使用 Laravel 的 mapInto 方法将数组值转换为枚举实例](https://www.harrisrafto.eu/transform-array-values-into-enum-instances-with-laravels-mapinto-method/) 198 | ### February 26, 2025 199 | - [robsontenorio/laravel-keycloak-guard: 🔑 Laravel 的简单 Keycloak Guard](https://github.com/robsontenorio/laravel-keycloak-guard) 200 | - [ytake/Laravel.Smarty: 适用于 Laravel 的 Smarty 模板引擎](https://github.com/ytake/Laravel.Smarty) 201 | - [dwightwatson/sitemap: ytake/Laravel.Smarty: 适用于 Laravel 的 Smarty 模板引擎](https://github.com/dwightwatson/sitemap) 202 | - [aarondfrancis/flaky: 处理由不可靠的第三方引起的间歇性故障 (断路器)](https://github.com/aarondfrancis/flaky) 203 | - [creagia/laravel-web-mailer: Laravel 邮件程序可捕捉所有已发送的邮件,并将其显示在应用程序视图中。](https://github.com/creagia/laravel-web-mailer) 204 | - [clickbar/laravel-magellan: 适用于 Laravel 的现代 PostGIS 工具箱](https://github.com/clickbar/laravel-magellan) 205 | ### February 25, 2025 206 | - [grikdotnet/generics:泛型编程的 PHP 实现](https://github.com/grikdotnet/generics) 207 | - [aphisitworachorch/kacher: Laravel DB (Doctrine) 转 DBML (dbdiagram.io / dbdocs.io)](https://github.com/aphisitworachorch/kacher) 208 | - [holistics/dbml: 数据库标记语言 (DBML),用于定义和记录数据库结构](https://github.com/holistics/dbml) 209 | - [cesargb/laravel-logs-rotate: 使用压缩旋转文件日志](https://github.com/cesargb/laravel-logs-rotate) 210 | - [TheDragonCode/size-sorter: 轻松排序衣服尺寸、身高、胸罩尺寸、家具尺寸等](https://github.com/TheDragonCode/size-sorter) 211 | - [cesargb/laravel-cascade-delete: 实现多态关系的 Eloquent 模型的级联删除](https://github.com/cesargb/laravel-cascade-delete) 212 | - [milon/barcode: Laravel 条形码生成器](https://github.com/milon/barcode) 213 | - [josezenem/laravel-make-migration-pivot: 这将允许您通过简单地传递两个模型,使用新的 Laravel 9 闭包迁移格式创建数据透视表迁移文件。](https://github.com/josezenem/laravel-make-migration-pivot) 214 | - [dcblogdev/laravel-sent-emails: 在 Laravel 中存储传出电子邮件](https://github.com/dcblogdev/laravel-sent-emails) 215 | - [dcblogdev/laravel-sent-emails: 记录和查看所有已发送的电子邮件](https://github.com/dcblogdev/laravel-sent-emails) 216 | - [dcblogdev/laravel-db-sync: 将远程数据库同步到本地数据库](https://github.com/dcblogdev/laravel-db-sync) 217 | ### February 24, 2025 218 | - [Hayden Pierce / ClassFinder: 这是一个非常简单的工具,用于识别给定命名空间中的类。](https://gitlab.com/hpierce1102/ClassFinder) 219 | - [thephpleague/construct-finder: PHP 代码构造搜索器](https://github.com/thephpleague/construct-finder) 220 | - [alekitto/class-finder: 帮助发现其他类/命名空间的实用程序类](https://github.com/alekitto/class-finder) 221 | - [ergebnis/classy: 🔍 提供一个 composer 包,其中包含用于经典结构 (类、枚举、接口和特征) 的查找器。](https://github.com/ergebnis/classy) 222 | ### February 23, 2025 223 | - [alekitto/class-finder: 帮助发现其他类/命名空间的实用程序类](https://github.com/alekitto/class-finder) 224 | ### February 21, 2025 225 | - [umlx5h/gtrash: 功能强大的垃圾桶 CLI 管理器:rm 和 trash-cli 的替代品](https://github.com/umlx5h/gtrash) 226 | - [spatie/laravel-ignition: Laravel 应用程序的美丽错误页面](https://github.com/spatie/laravel-ignition) 227 | - [web-dahuyou/NiceTab: 浏览器插件:方便快捷的浏览器标签页管理插件,OneTab 的升级替代品](https://github.com/web-dahuyou/NiceTab) 228 | ### February 20, 2025 229 | - [aeon-php/aeon: PHP 完全不可变的 DateTime 库](https://github.com/aeon-php/aeon) 230 | ### February 19, 2025 231 | - [sosauce/CuteMusic: CuteMusic 是一款适用于 Android 的简单、轻量级和开源离线音乐播放器应用程序。](https://github.com/sosauce/CuteMusic) 232 | - [sosauce/CuteCalc: CuteCalc 是一款适用于 Android 的简单、轻量级和开源计算器应用程序。](https://github.com/sosauce/CuteCalc) 233 | ### February 17, 2025 234 | - [chengpohi/edql: Elasticsearch Query GUI 客户端](https://github.com/chengpohi/edql) 235 | ### February 16, 2025 236 | - [fusion-php/fusion: 将您的现代前端与 Laravel 后端相结合。](https://github.com/fusion-php/fusion) 237 | - [mindplay-dk/php-vite: 一个用于 Vite 的轻量级 PHP 后端集成包](https://github.com/mindplay-dk/php-vite) 238 | ### February 15, 2025 239 | - [christophrumpel/artisan-benchmark](https://github.com/christophrumpel/artisan-benchmark) 240 | - [recloudstream/cloudstream:用于流式传输和下载媒体的 Android 应用程序。](https://github.com/recloudstream/cloudstream) 241 | ### February 14, 2025 242 | - [madewithlove/semver: Packagist 的 SemVer 检查器](https://github.com/madewithlove/semver) 243 | ### February 13, 2025 244 | - [King2500/idea-php-advanced-autocomplete: PhpStorm IDE 插件。添加对各种内置 PHP 函数的自动完成支持,其中 parameter 是字符串文字。](https://github.com/King2500/idea-php-advanced-autocomplete) 245 | - [aatrooox/imgx: 一行 URL 动态生成封面图](https://github.com/aatrooox/imgx) 246 | - [CherryHQ/cherry-studio: 🍒 Cherry Studio 是一个桌面客户端,支持多个 LLM 提供程序。](https://github.com/CherryHQ/cherry-studio) 247 | ### February 12, 2025 248 | - [RightCapitalHQ/phpdoc-parser: 支持交集类型和泛型的下一代 PHPDoc 解析器 (TypeScript 版本)](https://github.com/RightCapitalHQ/phpdoc-parser) 249 | - [turbanoff/RunConfigurationAsAction: 提供一种将 IntelliJ 运行配置用作按钮的方法](https://github.com/turbanoff/RunConfigurationAsAction) 250 | ### February 11, 2025 251 | - [cars10/elasticvue: Elasticsearch GUI - 适用于桌面和您的浏览器](https://github.com/cars10/elasticvue) 252 | - [DirectoryTree/ImapEngine: 将 IMAP 邮箱交互集成到您的 PHP 应用程序中。](https://github.com/DirectoryTree/ImapEngine) 253 | - [DirectoryTree/Dummy: 生成填充了虚拟数据的 PHP 类实例](https://github.com/DirectoryTree/Dummy) 254 | - [wakatime/jetbrains-wakatime: WakaTime 是一个开源 Jetbrains 插件,用于从您的编程活动自动生成指标、见解和时间跟踪。](https://github.com/wakatime/jetbrains-wakatime) 255 | ### February 9, 2025 256 | - [spatie/laravel-onboard: 一个 Laravel 包,用于帮助跟踪用户引导步骤](https://github.com/spatie/laravel-onboard) 257 | ### February 8, 2025 258 | - [junstyle/vscode-php-cs-fixer: VS Code 的 PHP CS Fixer 扩展](https://github.com/junstyle/vscode-php-cs-fixer) 259 | - [aniftyco/skeletor: 召唤 Skeletor 的仆从:一个 Composer 伴侣,通过每个“create-project”命令释放额外的功能。](https://github.com/aniftyco/skeletor) 260 | - [benbjurstrom/otpz: Laravel 无密码 OTP 登录解决方案](https://github.com/benbjurstrom/otpz) 261 | - [spatie/laravel-backup-server:轻松设置备份服务器以存储和管理来自多个 Laravel 应用程序的备份。](https://github.com/spatie/laravel-backup-server) 262 | - [Mahmoud-Italy/laraotel-opentelemetry-laravel: 此软件包提供了一种简单的方法,可以使用从 OpenTelemetry Otel 到 Laravel 应用程序的遥测来测量作业和服务的性能。](https://github.com/Mahmoud-Italy/laraotel-opentelemetry-laravel) 263 | - [packistry/packistry: 用于 PHP 软件包的开源、自托管、Composer 存储库](https://github.com/packistry/packistry) 264 | - [maantje/pulse-database: 用于数据库状态的 Laravel Pulse 卡](https://github.com/maantje/pulse-database) 265 | - [maantje/pulse-php-fpm: 适用于 Laravel Pulse 的 PHP FPM 状态卡](https://github.com/maantje/pulse-php-fpm) 266 | - [Yoast/PHPUnit-Polyfills: 一组 polyfill,用于更改 PHPUnit 功能,允许创建 PHPUnit 跨版本兼容测试](https://github.com/Yoast/PHPUnit-Polyfills) 267 | - [php-ds/polyfill: PHP 的数据结构](https://github.com/php-ds/polyfill) 268 | - [BenMorel/weakmap-polyfill: 用于 PHP 7.4 的 WeakMap polyfill](https://github.com/BenMorel/weakmap-polyfill) 269 | - [abreksa4/mysql-escape-string-polyfill: 对于非常有限的用例来说,一个非常不安全的 mysql_escape_string 实现](https://github.com/abreksa4/mysql-escape-string-polyfill) 270 | - [roukmoute/polyfill-calendar: Calendar 扩展的 PHP Polyfill](https://github.com/roukmoute/polyfill-calendar) 271 | - [ChristiaanBye/polyfill-each: PHP 8.x polyfill 用于已删除的 each () 函数](https://github.com/ChristiaanBye/polyfill-each) 272 | ### February 7, 2025 273 | - [jonathanlermitage/ij-ilove-devtoys: 基于 IntelliJ IDEA 的 IDE 插件,受到 DevToys 软件的高度启发,提供了哈希工具、多种数据转换和生成工具、转义工具、集合差异查看器等功能。](https://github.com/jonathanlermitage/ij-ilove-devtoys) 274 | - [behastan/behastan: 用于 Behat 检验的 Modren 静态分析](https://github.com/behastan/behastan) 275 | ### February 6, 2025 276 | - [meanmail-dev/nginx-intellij-plugin: Intellij Plugin for Nginx 配置文件](https://github.com/meanmail-dev/nginx-intellij-plugin) 277 | - [carlrobertoh/CodeGPT: 适用于 JetBrains 的领先开源 AI 副驾驶。连接到任何环境中的任何模型,并以您喜欢的任何方式自定义您的编码体验。](https://github.com/carlrobertoh/CodeGPT) 278 | ### February 5, 2025 279 | - [samsonasik/ErrorHeroModule: 💎 一个英雄,用于您的 Zend Framework/Laminas 和 Expressive/Mezzio 应用程序在 Mvc 过程中/请求和响应之间记录 (DB 和 Mail) 并处理 php 错误和异常。](https://github.com/samsonasik/ErrorHeroModule) 280 | - [samsonasik/ArrayLookup: 🚀 一个快速查找库,可帮助您验证和搜索数组和 Traversable 数据。](https://github.com/samsonasik/ArrayLookup) 281 | - [samsonasik/ForceHttpsModule: 🔗 用于在 Zend Framework/Laminas Mvc 和 ZF Expressive/Mezzio 应用程序中强制 https 的可配置模块。](https://github.com/samsonasik/ForceHttpsModule) 282 | - [cline/cline: IDE 中的自主编码代理,能够在您的许可下创建/编辑文件、执行命令、使用浏览器等。](https://github.com/cline/cline) 283 | ### February 4, 2025 284 | - [AutomaApp/automa: 一个浏览器扩展,用于通过连接块来自动化您的浏览器](https://github.com/AutomaApp/automa) 285 | - [tmdh/laravel-kit: 桌面 Laravel 管理面板应用程序](https://github.com/tmdh/laravel-kit) 286 | - [sethsandaru/eloquent-docs: 轻松为您的 Eloquent 模型生成 phpDoc](https://github.com/sethsandaru/eloquent-docs) 287 | ### February 2, 2025 288 | - [stalwartlabs/mail-server: 安全且现代的一体化邮件服务器 (IMAP、JMAP、POP3、SMTP)](https://github.com/stalwartlabs/mail-server) 289 | ### February 1, 2025 290 | - [hiddify/hiddify-app: 多平台自动代理客户端,支持 Sing-box、X-ray、TUIC、Hysteria、Reality、Trojan、SSH 等。它是一个开源、安全且无广告的。](https://github.com/hiddify/hiddify-app) 291 | - [loupe-php/loupe: 一个全文搜索引擎,具有仅基于 PHP 和 SQLite 的词汇切分、词干提取、拼写错误容忍度、过滤器和地理支持。](https://github.com/loupe-php/loupe) 292 | - [carthage-software/mago: Mago 是一个 PHP 工具链,旨在提供一组工具来帮助开发人员编写更好的代码。](https://github.com/carthage-software/mago) 293 | - [smoqadam/pvm: 一个简单的 bash 脚本,用于管理 Linux 和 macOS 上的多个 PHP 版本。](https://github.com/smoqadam/pvm) 294 | - [xepozz/meta-storm-idea-plugin: MetaStorm 将使您的 IDE 以前所未有的方式交互](https://github.com/xepozz/meta-storm-idea-plugin) 295 | - [buggregator/phpstorm-plugin: 该插件将 Buggregator 集成到 JetBrains IDE 中,让您能够轻松调试代码。现在,您无需切换到另一个窗口或屏幕来查看转储,然后返回运行测试。一切都摆在您面前,所有的捷径都有效。](https://github.com/buggregator/phpstorm-plugin) 296 | - [xepozz/crontab-intellij-plugin: Cron 和 Crontab 支持的公共存储库 Intellij 插件](https://github.com/xepozz/crontab-intellij-plugin) 297 | - [构建可维护的 PHP 应用程序:数据传输对象](https://davorminchorov.com/articles/building-maintainable-php-applications-data-transfer-objects) 298 | ### January 29, 2025 299 | - [mstange/samply: 适用于 macOS 和 Linux 的命令行采样剖析器](https://github.com/mstange/samply) 300 | ### January 27, 2025 301 | - [chevere/workflow: PHP 库,用于定义和执行具有并行处理功能的工作流。允许创建具有依赖关系、条件执行和变量注入的复杂任务链。](https://github.com/chevere/workflow) 302 | ### January 26, 2025 303 | - [yassinebenaid/bunster: 将 shell 脚本编译为静态二进制文件。](https://github.com/yassinebenaid/bunster) 304 | ### January 25, 2025 305 | - [TheBoredTeam/boring.notch: TheBoringNotch:不那么无聊的 Notch That Rocks 🎸🎶](https://github.com/TheBoredTeam/boring.notch) 306 | - [webui-dev/go-webui: 使用任何 Web 浏览器作为 GUI,后端使用 Go,前端使用现代 Web 技术。](https://github.com/webui-dev/go-webui) 307 | ### January 24, 2025 308 | - [azjezz/php-pretty-diff: PHP + Rust:如何在 PHP 项目中使用 Rust 代码](https://github.com/azjezz/php-pretty-diff) 309 | ### January 23, 2025 310 | - [cdsmths/laravel-ocr-space: Laravel OCR Space 是一个软件包,允许您在 Laravel 应用程序中使用 OCR.Space API 进行光学字符识别 (OCR)。](https://github.com/cdsmths/laravel-ocr-space) 311 | - [avocet-shores/laravel-rewind: Laravel Rewind 是一个功能强大且高效的版本控制包,适用于您的 Eloquent 模型](https://github.com/avocet-shores/laravel-rewind) 312 | ### January 22, 2025 313 | - [sapics/ip-location-db: sapics/ip-location-db:](https://github.com/sapics/ip-location-db) 314 | - [sapics/ip-location-db: 通过 ASN、GeoFeed、Whois、iptoasn.com、db-ip lite、GeoLite2 的 IP 到位置数据库](https://github.com/sapics/ip-location-db) 315 | - [mjelamanov/psr18-guzzle: 用于 guzzle 6 客户端的 PSR-18 适配器](https://github.com/mjelamanov/psr18-guzzle) 316 | - [Stillat/dagger: 适用于 Laravel Blade 的强大组件创作库。](https://github.com/Stillat/dagger) 317 | ### January 19, 2025 318 | - [HandBrake/HandBrake:HandBrake 是一款适用于 Linux、Mac 和 Windows 的开源视频转码器](https://github.com/HandBrake/HandBrake) 319 | - [alfg/ffmpeg-commander: 🛠️ FFmpeg 命令生成器 Web UI](https://github.com/alfg/ffmpeg-commander) 320 | - [savannabits/api-keys: 使用 API 密钥验证您的 Laravel API](https://github.com/savannabits/api-keys) 321 | ### January 18, 2025 322 | - [mainframecomputer/fullmoon-ios: fullmoon 是一款 iOS 应用程序,用于与本地大型语言模型聊天,它针对 Apple silicon 进行了优化,可在 iPhone、iPad 和 Mac 上运行。您的聊天记录会保存在本地,您还可以自定义应用程序的外观。](https://github.com/mainframecomputer/fullmoon-ios) 323 | - [Naoray/laravel-github-monolog: GitHub 问题的 Laravel 日志频道](https://github.com/Naoray/laravel-github-monolog) 324 | - [alexpasmantier/television: 是一款快速且多功能的模糊查找器 TUI。](https://github.com/alexpasmantier/television) 325 | - [damms005/devdb-vscode: 零配置 VS Code 数据库扩展,具有辅助开发和调试的功能。](https://github.com/damms005/devdb-vscode) 326 | - [byawitz/ggh: 调用您的 SSH 会话 (同时搜索您的 SSH 配置文件)](https://github.com/byawitz/ggh/) 327 | ### January 17, 2025 328 | - [nimbly/Syndicate: 强大的队列和 pubsub 消息发布者和使用者框架。](https://github.com/nimbly/Syndicate) 329 | - [https://github.com/nimbly](https://github.com/nimbly) 330 | - [nimbly/Carton: 一个简单的 PSR-11 容器实现。](https://github.com/nimbly/Carton) 331 | - [jlorente/php-credit-cards: 一个 PHP 包,用于对借记卡和信用卡执行操作,例如验证品牌、数字和 Luhn 算法和格式。它验证了 Visa、Mastercard、American Express 等流行品牌。](https://github.com/jlorente/php-credit-cards) 332 | ### January 16, 2025 333 | - [simplesamlphp/assert: webmozart/assert 的包装器,使其在检查方法参数之外有用](https://github.com/simplesamlphp/assert) 334 | ### January 15, 2025 335 | - [fschmtt/keycloak-rest-api-client-php: PHP 客户端与 Keycloak 的 Admin REST API 交互。](https://github.com/fschmtt/keycloak-rest-api-client-php) 336 | - [Jaennaet/pISSStream: macOS 菜单栏应用程序,可实时显示国际空间站的尿瓶装满情况](https://github.com/Jaennaet/pISSStream) 337 | - [mariovalney/laravel-keycloak-web-guard: 简单的 Keycloak Guard 到 Laravel Web 路由](https://github.com/mariovalney/laravel-keycloak-web-guard) 338 | - [CodeWithKyrian/whisper.php: 借助 Whisper.cpp 和 OpenAI,PHP 中的本地语音转文本变得容易](https://github.com/CodeWithKyrian/whisper.php) 339 | - [luadotsh/lua: 专为现代团队设计的开源、下一代可扩展 URL 缩短器。](https://github.com/luadotsh/lua) 340 | - [deepseek-php/deepseek-laravel: 用于 Deepseek PHP 客户端的 Laravel 包装器,用于与 laravel 应用程序的无缝 deepseek API 集成。](https://github.com/deepseek-php/deepseek-laravel) 341 | - [zackAJ/laravel-debounce: zackAJ/laravel-debounce: 一个 Laravel 包,可为您提供对作业、通知和 Artisan 命令的防抖效果,并提供很好的事件报告。](https://github.com/zackAJ/laravel-debounce) 342 | - [waadmawlood/laravel-model-metadata: 一个 Laravel 包,旨在通过 JSON 管理模型元数据,支持多种数据类型](https://github.com/waadmawlood/laravel-model-metadata) 343 | ### January 13, 2025 344 | - [debugly/ijkplayer: 基于 ijkplayer 的 iOS/macOS/tvOS 视频播放器,使用 FFmpeg 6,支持 Metal、hw accel、HDR、ass 字幕效果...](https://github.com/debugly/ijkplayer) 345 | ### January 12, 2025 346 | - [boyter/cs: 命令行代码 Pelunker 或代码搜索](https://github.com/boyter/cs) 347 | - [jaywcjlove/rightmenu-master: 通过右键单击菜单新建文件](https://github.com/jaywcjlove/rightmenu-master) 348 | - [yafoo/pushme: PushMe,一个简单轻量的 Android 消息通知客户端!](https://github.com/yafoo/pushme) 349 | ### January 9, 2025 350 | - [nuta/operating-system-in-1000-lines: 用 1000 行编写操作系统。](https://github.com/nuta/operating-system-in-1000-lines) 351 | ### January 8, 2025 352 | - [patricktalmadge/bootstrapper: Laravel Twitter Bootstrap 捆绑包](https://github.com/patricktalmadge/bootstrapper) 353 | - [kalynasolutions/laravel-tus: Laravel 软件包,用于处理具有 tus 协议和本机 Uppy.js 支持的断点文件上传,而无需额外的 tus 服务器。](https://github.com/kalynasolutions/laravel-tus) 354 | - [robsontenorio/laravel-keycloak-guard: 🔑 Laravel 的简单 Keycloak Guard](https://github.com/robsontenorio/laravel-keycloak-guard) 355 | ### January 5, 2025 356 | - [nassiry/flash-messages: 一个轻量级的 PHP 库,用于处理带有会话存储和渲染的 flash 消息。](https://github.com/nassiry/flash-messages) 357 | - [sethvargo/go-limiter: 一个用于 Go with HTTP 中间件的超音速限速包。](https://github.com/sethvargo/go-limiter) 358 | - [cornernote/yii2-softdelete: Yii2 的软删除行为](https://github.com/cornernote/yii2-softdelete) 359 | - [ghostwriter/phormat: PHP 代码格式化程序。](https://github.com/ghostwriter/phormat) 360 | - [ghostwriter/syntax: PHP 的词法分析库 (Tokenizer、Lexer、Parser、Generator) 关闭](https://github.com/ghostwriter/syntax) 361 | - [dcblogdev/laravel-microsoft-graph: 适用于 Microsoft Graph API 的 Laravel 包 (Microsoft365)](https://github.com/dcblogdev/laravel-microsoft-graph) 362 | - [knotsphp/publicip: 使用 PHP 获取公共 IP 地址的快速可靠方法](https://github.com/knotsphp/publicip) 363 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-cayman -------------------------------------------------------------------------------- /app/Commands/Command.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view 9 | * the LICENSE file that was distributed with this source code. 10 | * 11 | * @see https://github.com/guanguans/favorite-link 12 | */ 13 | 14 | namespace App\Commands; 15 | 16 | use Cerbero\CommandValidator\ValidatesInput; 17 | 18 | abstract class Command extends \Illuminate\Console\Command 19 | { 20 | use ValidatesInput; 21 | } 22 | -------------------------------------------------------------------------------- /app/Commands/FeedCommand.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view 9 | * the LICENSE file that was distributed with this source code. 10 | * 11 | * @see https://github.com/guanguans/favorite-link 12 | */ 13 | 14 | namespace App\Commands; 15 | 16 | use Illuminate\Support\Collection; 17 | use Illuminate\Support\Facades\Date; 18 | use Illuminate\Support\Facades\File; 19 | use Illuminate\Support\Facades\Process; 20 | use Illuminate\Support\Stringable; 21 | use Laminas\Feed\Writer\Feed; 22 | 23 | /** 24 | * @see https://docs.laminas.dev/laminas-feed/ 25 | * @see https://github.com/composer/packagist/blob/main/src/Controller/FeedController.php 26 | */ 27 | final class FeedCommand extends Command 28 | { 29 | private const string REPOSITORY_LINK = 'https://github.com/guanguans/favorite-link'; 30 | private const string FLAG = '### '; 31 | protected $signature = <<<'SIGNATURE' 32 | feed:generate 33 | {--from=README.md : The path of the README file.} 34 | SIGNATURE; 35 | protected $description = 'Generate feed.'; 36 | 37 | /** 38 | * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException 39 | */ 40 | public function handle(): void 41 | { 42 | /** @noinspection NullPointerExceptionInspection */ 43 | str(File::get($this->option('from'))) 44 | ->tap(function (Stringable $stringable): void { 45 | File::put( 46 | $this->option('from'), 47 | $stringable->replace(str_repeat(\PHP_EOL, 6), str_repeat(\PHP_EOL, 2))->toString() 48 | ); 49 | }) 50 | ->after(self::FLAG) 51 | ->prepend(self::FLAG) 52 | ->explode(\PHP_EOL) 53 | ->filter(filled(...)) 54 | ->map(str(...)) 55 | ->reduce( 56 | static function (Collection $carry, Stringable $stringable) use (&$date): Collection { 57 | if ($stringable->startsWith(self::FLAG)) { 58 | $date = $stringable->remove(self::FLAG)->trim(); 59 | 60 | return $carry; 61 | } 62 | 63 | return $carry->add([ 64 | 'date' => ($date = Date::createFromTimestamp(strtotime((string) $date)))->isCurrentDay() ? now() : $date, 65 | 'title' => $title = (string) $stringable->match('/\[.*\]/')->trim('[]'), 66 | 'link' => $link = (string) $stringable->match('/\(.*\)/')->trim('()'), 67 | 'repository_link' => $repositoryLink = self::REPOSITORY_LINK, 68 | 'content' => <<$title 70 |

相关链接

71 | 75 | HTML, 76 | ]); 77 | }, 78 | collect() 79 | ) 80 | ->tap(function (Collection $items): void { 81 | $feed = $this->createDefaultFeed(); 82 | 83 | $items->each(static function (array $item) use ($feed): void { 84 | $entry = $feed->createEntry(); 85 | 86 | $entry->setEncoding('UTF-8'); 87 | $entry->setTitle($item['title']); 88 | $entry->setLink($item['link']); 89 | $entry->setContent($item['content']); 90 | $entry->setDateCreated($item['date']); 91 | $entry->setDateModified($item['date']); 92 | 93 | $feed->addEntry($entry); 94 | }); 95 | 96 | $feed->setDateModified($feed->getEntry()->getDateModified()); 97 | 98 | foreach (['atom', 'rss'] as $type) { 99 | $name = "README.$type"; 100 | $feed->setFeedLink("https://raw.githubusercontent.com/guanguans/favorite-link/master/$name", $type); 101 | File::put(base_path($name), $feed->export($type)); 102 | } 103 | }) 104 | ->tap(fn () => Process::run( 105 | 'git diff --color README.*', 106 | function (string $type, string $line): void { 107 | $this->output->write($line); 108 | } 109 | )) 110 | ->tap(fn () => $this->output->success('Feed is done!')); 111 | } 112 | 113 | /** 114 | * @noinspection MethodVisibilityInspection 115 | */ 116 | #[\Override] 117 | protected function rules(): array 118 | { 119 | return [ 120 | 'from' => 'required|ends_with:.md', 121 | ]; 122 | } 123 | 124 | #[\Override] 125 | protected function messages(): array 126 | { 127 | return [ 128 | 'from.required' => 'The path of the README file is required.', 129 | 'from.ends_with' => 'The path of the README file must end with .md', 130 | ]; 131 | } 132 | 133 | private function createDefaultFeed(): Feed 134 | { 135 | $feed = new Feed; 136 | $feed->setEncoding('UTF-8'); 137 | $feed->setTitle($title = '❤️ 每天收集喜欢的开源项目'); 138 | $feed->setDescription($title); 139 | $feed->setLink(self::REPOSITORY_LINK); 140 | $feed->addAuthor([ 141 | 'name' => 'guanguans', 142 | 'email' => 'ityaozm@gmail.com', 143 | 'uri' => 'https://github.com/guanguans', 144 | ]); 145 | 146 | return $feed; 147 | } 148 | } 149 | -------------------------------------------------------------------------------- /app/Commands/InspireCommand.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view 9 | * the LICENSE file that was distributed with this source code. 10 | * 11 | * @see https://github.com/guanguans/favorite-link 12 | */ 13 | 14 | namespace App\Commands; 15 | 16 | use Illuminate\Console\Scheduling\Schedule; 17 | use LaravelZero\Framework\Commands\Command; 18 | use function Termwind\render; 19 | 20 | final class InspireCommand extends Command 21 | { 22 | /** 23 | * The signature of the command. 24 | * 25 | * @var string 26 | */ 27 | protected $signature = 'inspire {name=Artisan}'; 28 | 29 | /** 30 | * The description of the command. 31 | * 32 | * @var string 33 | */ 34 | protected $description = 'Display an inspiring quote'; 35 | 36 | /** 37 | * Execute the console command. 38 | */ 39 | public function handle(): void 40 | { 41 | render( 42 | <<<'HTML' 43 |
44 |
Laravel Zero
45 | 46 | Simplicity is the ultimate sophistication. 47 | 48 |
49 | HTML 50 | ); 51 | } 52 | 53 | /** 54 | * Define the command's schedule. 55 | */ 56 | #[\Override] 57 | public function schedule(Schedule $schedule): void 58 | { 59 | // $schedule->command(static::class)->everyMinute(); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /app/Providers/AppServiceProvider.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view 9 | * the LICENSE file that was distributed with this source code. 10 | * 11 | * @see https://github.com/guanguans/favorite-link 12 | */ 13 | 14 | namespace App\Providers; 15 | 16 | use Illuminate\Support\ServiceProvider; 17 | 18 | final class AppServiceProvider extends ServiceProvider 19 | { 20 | /** 21 | * Bootstrap any application services. 22 | */ 23 | public function boot(): void {} 24 | 25 | /** 26 | * Register any application services. 27 | */ 28 | #[\Override] 29 | public function register(): void {} 30 | } 31 | -------------------------------------------------------------------------------- /bootstrap/app.php: -------------------------------------------------------------------------------- 1 | 10 | * 11 | * For the full copyright and license information, please view 12 | * the LICENSE file that was distributed with this source code. 13 | * 14 | * @see https://github.com/guanguans/favorite-link 15 | */ 16 | 17 | use Illuminate\Foundation\Configuration\Exceptions; 18 | use Illuminate\Log\LogManager; 19 | use Intonate\TinkerZero\TinkerZeroServiceProvider; 20 | use LaravelZero\Framework\Application; 21 | use Psr\Log\LoggerInterface; 22 | 23 | return Application::configure(basePath: \dirname(__DIR__)) 24 | // ->booted(static function (Application $app): void { 25 | // if (class_exists(TinkerZeroServiceProvider::class) && !$app->isProduction()) { 26 | // $app->register(TinkerZeroServiceProvider::class); 27 | // } 28 | // }) 29 | // ->booted(static function (Application $app): void { 30 | // $app->extend(LogManager::class, static function (LoggerInterface $logger, Application $application) { 31 | // if (!$logger instanceof LogManager) { 32 | // return new LogManager($application); 33 | // } 34 | // 35 | // return $logger; 36 | // }); 37 | // }) 38 | ->withExceptions(static function (Exceptions $exceptions): void { 39 | $exceptions->reportable(static fn (Throwable $throwable): bool => !Phar::running()); 40 | }) 41 | ->create(); 42 | -------------------------------------------------------------------------------- /bootstrap/providers.php: -------------------------------------------------------------------------------- 1 | 10 | * 11 | * For the full copyright and license information, please view 12 | * the LICENSE file that was distributed with this source code. 13 | * 14 | * @see https://github.com/guanguans/favorite-link 15 | */ 16 | 17 | use App\Providers\AppServiceProvider; 18 | use GrahamCampbell\GitHub\GitHubServiceProvider; 19 | use Illuminate\Auth\AuthServiceProvider; 20 | use Illuminate\Auth\Passwords\PasswordResetServiceProvider; 21 | use Illuminate\Broadcasting\BroadcastServiceProvider; 22 | use Illuminate\Bus\BusServiceProvider; 23 | use Illuminate\Cache\CacheServiceProvider; 24 | use Illuminate\Cookie\CookieServiceProvider; 25 | use Illuminate\Database\DatabaseServiceProvider; 26 | use Illuminate\Encryption\EncryptionServiceProvider; 27 | use Illuminate\Filesystem\FilesystemServiceProvider; 28 | use Illuminate\Foundation\Providers\ConsoleSupportServiceProvider; 29 | use Illuminate\Foundation\Providers\FoundationServiceProvider; 30 | use Illuminate\Hashing\HashServiceProvider; 31 | use Illuminate\Mail\MailServiceProvider; 32 | use Illuminate\Notifications\NotificationServiceProvider; 33 | use Illuminate\Pagination\PaginationServiceProvider; 34 | use Illuminate\Pipeline\PipelineServiceProvider; 35 | use Illuminate\Queue\QueueServiceProvider; 36 | use Illuminate\Redis\RedisServiceProvider; 37 | use Illuminate\Session\SessionServiceProvider; 38 | use Illuminate\Translation\TranslationServiceProvider; 39 | use Illuminate\Validation\ValidationServiceProvider; 40 | use Illuminate\View\ViewServiceProvider; 41 | 42 | /** 43 | * Copyright (c) 2018-2025 guanguans. 44 | * 45 | * For the full copyright and license information, please view 46 | * the LICENSE file that was distributed with this source code. 47 | * 48 | * @see https://github.com/guanguans/favorite-link 49 | */ 50 | 51 | return [ 52 | // AuthServiceProvider::class, 53 | // BroadcastServiceProvider::class, 54 | // BusServiceProvider::class, 55 | // CacheServiceProvider::class, 56 | // ConsoleSupportServiceProvider::class, 57 | // CookieServiceProvider::class, 58 | // DatabaseServiceProvider::class, 59 | // EncryptionServiceProvider::class, 60 | // FilesystemServiceProvider::class, 61 | // FoundationServiceProvider::class, 62 | // HashServiceProvider::class, 63 | // MailServiceProvider::class, 64 | // NotificationServiceProvider::class, 65 | // PaginationServiceProvider::class, 66 | // PasswordResetServiceProvider::class, 67 | // PipelineServiceProvider::class, 68 | // QueueServiceProvider::class, 69 | // RedisServiceProvider::class, 70 | // SessionServiceProvider::class, 71 | TranslationServiceProvider::class, 72 | ValidationServiceProvider::class, 73 | // ViewServiceProvider::class, 74 | 75 | AppServiceProvider::class, 76 | GitHubServiceProvider::class, 77 | ]; 78 | -------------------------------------------------------------------------------- /composer-updater: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | 8 | * 9 | * For the full copyright and license information, please view 10 | * the LICENSE file that was distributed with this source code. 11 | * 12 | * @see https://github.com/guanguans/favorite-link 13 | */ 14 | 15 | use Composer\InstalledVersions; 16 | use SebastianBergmann\Diff\Differ; 17 | use SebastianBergmann\Diff\Output\UnifiedDiffOutputBuilder; 18 | use Symfony\Component\Console\Input\ArgvInput; 19 | use Symfony\Component\Console\Input\InputInterface; 20 | use Symfony\Component\Console\Input\InputOption; 21 | use Symfony\Component\Console\Output\ConsoleOutput; 22 | use Symfony\Component\Console\Output\OutputInterface; 23 | use Symfony\Component\Console\SingleCommandApplication; 24 | use Symfony\Component\Console\Style\SymfonyStyle; 25 | use Symfony\Component\Process\ExecutableFinder; 26 | use Symfony\Component\Process\PhpExecutableFinder; 27 | use Symfony\Component\Process\Process; 28 | 29 | require __DIR__.'/vendor/autoload.php'; 30 | 31 | /** @noinspection PhpUnhandledExceptionInspection */ 32 | $status = (new SingleCommandApplication) 33 | ->setName('Composer Updater') 34 | ->addOption('composer-json-path', null, InputOption::VALUE_OPTIONAL) 35 | ->addOption('highest-php-binary', null, InputOption::VALUE_REQUIRED) 36 | ->addOption('composer-binary', null, InputOption::VALUE_OPTIONAL) 37 | ->addOption('except-packages', null, InputOption::VALUE_IS_ARRAY | InputOption::VALUE_OPTIONAL) 38 | ->addOption('except-dependency-versions', null, InputOption::VALUE_IS_ARRAY | InputOption::VALUE_OPTIONAL) 39 | ->addOption('dry-run', null, InputOption::VALUE_NONE) 40 | ->setCode(function (InputInterface $input, OutputInterface $output): void { 41 | // assert_options(\ASSERT_BAIL, 1); 42 | \assert($this instanceof SingleCommandApplication); 43 | \assert((bool) $input->getOption('highest-php-binary')); 44 | 45 | new class( 46 | $input->getOption('composer-json-path') ?: __DIR__.'/composer.json', 47 | $input->getOption('highest-php-binary'), 48 | $input->getOption('composer-binary'), 49 | $input->getOption('except-packages'), 50 | $input->getOption('except-dependency-versions'), 51 | $input->getOption('dry-run'), 52 | new SymfonyStyle($input, $output), 53 | new Differ(new UnifiedDiffOutputBuilder("--- Original\n+++ New\n", true)), 54 | ) { 55 | private readonly string $composerJsonPath; 56 | private readonly string $composerJsonContents; 57 | private readonly string $highestComposerBinary; 58 | private readonly string $composerBinary; 59 | private readonly array $exceptPackages; 60 | private readonly array $exceptDependencyVersions; 61 | private readonly SymfonyStyle $symfonyStyle; 62 | private readonly Differ $differ; 63 | 64 | /** 65 | * @noinspection ParameterDefaultsNullInspection 66 | */ 67 | public function __construct( 68 | string $composerJsonPath, 69 | ?string $highestPhpBinary = null, 70 | ?string $composerBinary = null, 71 | array $exceptPackages = [], 72 | array $exceptDependencyVersions = [], 73 | private readonly bool $dryRun = false, 74 | ?SymfonyStyle $symfonyStyle = null, 75 | ?Differ $differ = null 76 | ) { 77 | // assert_options(\ASSERT_BAIL, 1); 78 | \assert((bool) $composerJsonPath); 79 | 80 | $this->composerJsonPath = $composerJsonPath; 81 | $this->composerJsonContents = file_get_contents($composerJsonPath); 82 | $this->highestComposerBinary = $this->getComposerBinary($composerBinary, $highestPhpBinary); 83 | $this->composerBinary = $this->getComposerBinary($composerBinary); 84 | $this->exceptPackages = ['php', 'ext-*', ...$exceptPackages]; 85 | $this->exceptDependencyVersions = ['\*', '*-*', '*@*', ...$exceptDependencyVersions]; 86 | $this->symfonyStyle = $symfonyStyle ?? new SymfonyStyle(new ArgvInput, new ConsoleOutput); 87 | $this->differ = $differ ?? new Differ(new UnifiedDiffOutputBuilder("--- Original\n+++ New\n", true)); 88 | } 89 | 90 | /** 91 | * @noinspection NullPointerExceptionInspection 92 | */ 93 | public function __invoke(): void 94 | { 95 | $this 96 | ->updateComposerPackages() 97 | ->updateOutdatedComposerPackages() 98 | ->updateComposerPackages() 99 | ->updateOutdatedComposerPackages() 100 | ->updateComposerPackages() 101 | // ->normalizeComposerJson() 102 | ->success(); 103 | } 104 | 105 | private function updateComposerPackages(): self 106 | { 107 | $this->mustRunCommand("$this->composerBinary update -W --ansi"); 108 | 109 | return $this; 110 | } 111 | 112 | /** 113 | * @noinspection JsonEncodingApiUsageInspection 114 | * 115 | * @return $this|never-return 116 | */ 117 | private function updateOutdatedComposerPackages(): self 118 | { 119 | $outdatedComposerJsonContents = json_encode( 120 | $this->getOutdatedDecodedComposerJson(), 121 | \JSON_PRETTY_PRINT | \JSON_UNESCAPED_UNICODE | \JSON_UNESCAPED_SLASHES 122 | ).\PHP_EOL; 123 | 124 | if ($this->dryRun) { 125 | $this->symfonyStyle->writeln($this->formatDiff($this->differ->diff( 126 | $this->composerJsonContents, 127 | $outdatedComposerJsonContents 128 | ))); 129 | 130 | exit(0); 131 | } 132 | 133 | file_put_contents($this->composerJsonPath, $outdatedComposerJsonContents); 134 | 135 | return $this; 136 | } 137 | 138 | private function normalizeComposerJson(): self 139 | { 140 | $this->mustRunCommand("$this->composerBinary normalize --diff --ansi"); 141 | 142 | return $this; 143 | } 144 | 145 | private function success(): void 146 | { 147 | $this->symfonyStyle->success('Composer packages updated successfully!'); 148 | } 149 | 150 | /** 151 | * @noinspection JsonEncodingApiUsageInspection 152 | */ 153 | private function getOutdatedDecodedComposerJson(): array 154 | { 155 | $outdatedComposerPackages = $this->getOutdatedComposerPackages(); 156 | $decodedComposerJson = json_decode(file_get_contents($this->composerJsonPath), true); 157 | InstalledVersions::reload([]); 158 | 159 | foreach ($decodedComposerJson as $name => &$value) { 160 | if (!\in_array($name, ['require', 'require-dev'], true)) { 161 | continue; 162 | } 163 | 164 | foreach ($value as $package => &$dependencyVersion) { 165 | if ($this->strIs($this->exceptPackages, $package)) { 166 | continue; 167 | } 168 | 169 | if ($this->strIs($this->exceptDependencyVersions, $dependencyVersion)) { 170 | continue; 171 | } 172 | 173 | if ($version = InstalledVersions::getVersion($package)) { 174 | $dependencyVersion = $this->toDependencyVersion($version); 175 | } 176 | 177 | if (isset($outdatedComposerPackages[$package])) { 178 | $dependencyVersion = $outdatedComposerPackages[$package]['dependency_version']; 179 | } 180 | } 181 | } 182 | 183 | return $decodedComposerJson; 184 | } 185 | 186 | /** 187 | * @noinspection JsonEncodingApiUsageInspection 188 | */ 189 | private function getOutdatedComposerPackages(): array 190 | { 191 | return array_reduce( 192 | json_decode( 193 | substr( 194 | $output = $this 195 | ->mustRunCommand("$this->highestComposerBinary outdated --format=json --direct --ansi") 196 | ->getOutput(), 197 | strpos($output, '{') 198 | ), 199 | true 200 | )['installed'], 201 | function (array $carry, array $package): array { 202 | $lowestArrayVersion = $this->toArrayVersion($package['version']); 203 | $highestArrayVersion = $this->toArrayVersion($package['latest']); 204 | $dependencyVersions = [$this->toDependencyVersion($package['version'])]; 205 | 206 | if ($lowestArrayVersion[0] !== $highestArrayVersion[0]) { 207 | $dependencyVersions = [...$dependencyVersions, ...array_map( 208 | static fn (string $major): string => "^$major.0", 209 | range($lowestArrayVersion[0] + 1, $highestArrayVersion[0]) 210 | )]; 211 | } 212 | 213 | $package['dependency_version'] = implode(' || ', $dependencyVersions); 214 | $carry[$package['name']] = $package; 215 | 216 | return $carry; 217 | }, 218 | [] 219 | ); 220 | } 221 | 222 | private function getComposerBinary(?string $composerBinary = null, ?string $phpBinary = null): string 223 | { 224 | return \sprintf( 225 | '%s %s', 226 | $phpBinary ?? (new PhpExecutableFinder)->find(), 227 | $composerBinary ?? (new ExecutableFinder)->find('composer') 228 | ); 229 | } 230 | 231 | /** 232 | * @noinspection PhpSameParameterValueInspection 233 | * 234 | * @param mixed $input The input as stream resource, scalar or \Traversable, or null for no input 235 | */ 236 | private function mustRunCommand( 237 | array|string $command, 238 | ?string $cwd = null, 239 | ?array $env = null, 240 | mixed $input = null, 241 | ?float $timeout = 300 242 | ): Process { 243 | $additionalOptions = [ 244 | '--no-interaction', 245 | '--no-plugins', 246 | '--no-scripts', 247 | '--ansi', 248 | ]; 249 | 250 | $process = \is_string($command) 251 | ? Process::fromShellCommandline(\sprintf("$command %s", implode(' ', $additionalOptions)), $cwd, $env, $input, $timeout) 252 | : new Process($command + $additionalOptions, $cwd, $env, $input, $timeout); 253 | 254 | $this->symfonyStyle->warning($process->getCommandLine()); 255 | 256 | return $process 257 | ->setWorkingDirectory(\dirname($this->composerJsonPath)) 258 | ->setEnv(['COMPOSER_MEMORY_LIMIT' => -1]) 259 | ->mustRun(function (string $type, string $buffer): void { 260 | $this->symfonyStyle->isVerbose() and $this->symfonyStyle->write($buffer); 261 | }); 262 | } 263 | 264 | private function toDependencyVersion(string $version): string 265 | { 266 | return '^'.implode('.', \array_slice($this->toArrayVersion($version), 0, 2)); 267 | } 268 | 269 | private function toArrayVersion(string $version): array 270 | { 271 | return explode('.', ltrim($version, 'v')); 272 | } 273 | 274 | /** 275 | * @noinspection SuspiciousLoopInspection 276 | */ 277 | private function strIs(array|string $pattern, string $value): bool 278 | { 279 | $patterns = (array) $pattern; 280 | 281 | if ([] === $patterns) { 282 | return false; 283 | } 284 | 285 | foreach ($patterns as $pattern) { 286 | $pattern = (string) $pattern; 287 | 288 | if ($pattern === $value) { 289 | return true; 290 | } 291 | 292 | $pattern = preg_quote($pattern, '#'); 293 | $pattern = str_replace('\*', '.*', $pattern); 294 | 295 | if (1 === preg_match('#^'.$pattern.'\z#u', $value)) { 296 | return true; 297 | } 298 | } 299 | 300 | return false; 301 | } 302 | 303 | private function formatDiff(string $diff): string 304 | { 305 | $lines = explode( 306 | "\n", 307 | $diff, 308 | ); 309 | 310 | $formatted = array_map(static fn (string $line): string => preg_replace( 311 | [ 312 | '/^(\+.*)$/', 313 | '/^(-.*)$/', 314 | ], 315 | [ 316 | '$1', 317 | '$1', 318 | ], 319 | $line, 320 | ), $lines); 321 | 322 | return implode( 323 | "\n", 324 | $formatted, 325 | ); 326 | } 327 | }(); 328 | }) 329 | ->run(); 330 | 331 | exit($status); 332 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "laravel-zero/laravel-zero", 3 | "description": "The Laravel Zero Framework.", 4 | "license": "MIT", 5 | "type": "project", 6 | "keywords": [ 7 | "framework", 8 | "laravel", 9 | "laravel zero", 10 | "console", 11 | "cli" 12 | ], 13 | "authors": [ 14 | { 15 | "name": "Nuno Maduro", 16 | "email": "enunomaduro@gmail.com" 17 | } 18 | ], 19 | "homepage": "https://laravel-zero.com", 20 | "support": { 21 | "issues": "https://github.com/laravel-zero/laravel-zero/issues", 22 | "source": "https://github.com/laravel-zero/laravel-zero" 23 | }, 24 | "require": { 25 | "php": "^8.4", 26 | "cerbero/command-validator": "^3.0", 27 | "graham-campbell/github": "^13.0", 28 | "illuminate/validation": "^11.44 || ^12.0", 29 | "laminas/laminas-feed": "^2.23", 30 | "laravel-zero/framework": "^11.36" 31 | }, 32 | "require-dev": { 33 | "bamarni/composer-bin-plugin": "^1.8", 34 | "ergebnis/composer-normalize": "^2.47", 35 | "ergebnis/license": "^2.6", 36 | "ergebnis/php-cs-fixer-config": "dev-main", 37 | "fakerphp/faker": "^1.24", 38 | "guanguans/ai-commit": "dev-main", 39 | "mockery/mockery": "^1.6", 40 | "pestphp/pest": "^3.8", 41 | "phpstan/extension-installer": "^1.4", 42 | "phpstan/phpstan": "^2.1", 43 | "rector/rector": "^2.0", 44 | "roave/security-advisories": "dev-latest" 45 | }, 46 | "minimum-stability": "stable", 47 | "prefer-stable": true, 48 | "autoload": { 49 | "psr-4": { 50 | "App\\": "app/", 51 | "Database\\Factories\\": "database/factories/", 52 | "Database\\Seeders\\": "database/seeders/" 53 | } 54 | }, 55 | "autoload-dev": { 56 | "psr-4": { 57 | "Tests\\": "tests/" 58 | } 59 | }, 60 | "bin": [ 61 | "favorite-link" 62 | ], 63 | "config": { 64 | "allow-plugins": { 65 | "bamarni/composer-bin-plugin": true, 66 | "ergebnis/composer-normalize": true, 67 | "pestphp/pest-plugin": true, 68 | "php-http/discovery": true, 69 | "phpstan/extension-installer": true 70 | }, 71 | "optimize-autoloader": true, 72 | "preferred-install": "dist", 73 | "sort-packages": true 74 | }, 75 | "extra": { 76 | "bamarni-bin": { 77 | "bin-links": true, 78 | "forward-command": true, 79 | "target-directory": "vendor-bin" 80 | }, 81 | "composer-normalize": { 82 | "indent-size": 4, 83 | "indent-style": "space" 84 | }, 85 | "hooks": { 86 | "post-merge": [ 87 | "composer checks" 88 | ], 89 | "pre-commit": [ 90 | "composer checks" 91 | ] 92 | } 93 | }, 94 | "scripts": { 95 | "post-install-cmd": [ 96 | "@composer-bin-all-update" 97 | ], 98 | "post-update-cmd": [ 99 | "@composer-bin-all-update" 100 | ], 101 | "ai-commit": "@php ./vendor/bin/ai-commit commit --ansi", 102 | "ai-commit-bito": "@ai-commit --generator=bito_cli", 103 | "ai-commit-bito-no-verify": "@ai-commit-bito --no-verify", 104 | "ai-commit-github-copilot": "@ai-commit --generator=github_copilot_cli", 105 | "ai-commit-github-copilot-no-verify": "@ai-commit-github-copilot --no-verify", 106 | "ai-commit-github-models": "@ai-commit --generator=github_models_cli", 107 | "ai-commit-github-models-no-verify": "@ai-commit-github-models --no-verify", 108 | "ai-commit-no-verify": "@ai-commit --no-verify", 109 | "autocorrect": "autocorrect README.md", 110 | "autocorrect-fix": "@autocorrect --fix", 111 | "autocorrect-lint": "@autocorrect --lint", 112 | "cghooks": "@php ./vendor/bin/cghooks --ansi -v", 113 | "checks": [ 114 | "@composer-normalize", 115 | "@composer-validate", 116 | "@style-lint", 117 | "@autocorrect-lint", 118 | "@md-lint", 119 | "@zh-lint", 120 | "@test", 121 | "@rector-dry-run" 122 | ], 123 | "composer-bin-all-update": "@composer bin all update --ansi -v", 124 | "composer-check-platform-reqs": "@composer check-platform-reqs --lock --ansi -v", 125 | "composer-normalize": "@composer normalize --dry-run --diff --ansi -v", 126 | "composer-updater": "@php ./composer-updater --highest-php-binary=/opt/homebrew/opt/php@8.4/bin/php --ansi", 127 | "composer-updater-dry-run": "@composer-updater --dry-run", 128 | "composer-validate": "@composer validate --check-lock --strict --ansi -v", 129 | "facade-lint": "@facade-update --lint", 130 | "facade-update": "/opt/homebrew/opt/php@8.4/bin/php -f ./facade.php -- App\\\\Facades\\\\Music", 131 | "json-lint": "@php ./vendor/bin/jsonlint *.json .*rc", 132 | "lint": [ 133 | "for DIR in .; do find $DIR -maxdepth 1 -type f -name '*.php' -type f ! -name 'xxx.php' -exec php -l {} \\; 2>&1 | (! grep -v '^No syntax errors detected'); done", 134 | "for DIR in ./app ./bootstrap ./config ./tests; do find $DIR -type f -name '*.php' -type f ! -name 'xxx.php' -exec php -l {} \\; 2>&1 | (! grep -v '^No syntax errors detected'); done" 135 | ], 136 | "md-fix": "@md-lint --fix", 137 | "md-lint": "lint-md 'README.md' --config=.lintmdrc --threads", 138 | "pest": "@php ./vendor/bin/pest --configuration=phpunit.xml.dist --colors=always --coverage --profile --parallel -v", 139 | "pest-coverage": "@pest --coverage-html=./.build/phpunit/ --coverage-clover=./.build/phpunit/clover.xml", 140 | "pest-migrate-configuration": "@pest --migrate-configuration", 141 | "pest-profile": "@pest --profile", 142 | "pest-type-coverage": "@pest --type-coverage", 143 | "phpstan": "@php ./vendor/bin/phpstan analyse --ansi -vv", 144 | "phpstan-baseline": "@phpstan --generate-baseline --allow-empty-baseline", 145 | "post-merge": [ 146 | "@composer install" 147 | ], 148 | "psalm": "@php ./vendor/bin/psalm", 149 | "psalm-baseline": "@psalm --update-baseline", 150 | "putenvs": [ 151 | "@putenv PHP73=/opt/homebrew/opt/php@7.3/bin/php", 152 | "@putenv PHP74=/opt/homebrew/opt/php@7.4/bin/php", 153 | "@putenv PHP80=/opt/homebrew/opt/php@8.0/bin/php", 154 | "@putenv PHP81=/opt/homebrew/opt/php@8.1/bin/php", 155 | "@putenv PHP82=/opt/homebrew/opt/php@8.2/bin/php", 156 | "@putenv PHP83=/opt/homebrew/opt/php@8.3/bin/php", 157 | "@putenv PHP84=/opt/homebrew/opt/php@8.4/bin/php", 158 | "@putenv PHP_CS_FIXER_IGNORE_ENV=1" 159 | ], 160 | "readme-fix": [ 161 | "@autocorrect-fix", 162 | "@md-fix", 163 | "@zh-fix" 164 | ], 165 | "rector": "@php ./vendor/bin/rector --ansi -v", 166 | "rector-dry-run": "@rector --dry-run", 167 | "release": "@php ./vendor/bin/monorepo-builder release --ansi -v", 168 | "release-major": "@release major", 169 | "release-major-dry-run": "@release-major --dry-run", 170 | "release-minor": "@release minor", 171 | "release-minor-dry-run": "@release-minor --dry-run", 172 | "release-patch": "@release patch", 173 | "release-patch-dry-run": "@release-patch --dry-run", 174 | "style-fix": [ 175 | "@putenvs", 176 | "@php ./vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.php --show-progress=dots --diff --ansi -v" 177 | ], 178 | "style-lint": "@style-fix --dry-run", 179 | "test": "@pest", 180 | "test-coverage": "@pest-coverage", 181 | "test-migrate-configuration": "@pest-migrate-configuration", 182 | "test-phpunit": "@php ./vendor/bin/phpunit --cache-result-file=./.build/phpunit/.phpunit.result.cache --coverage-text --ansi -v", 183 | "test-phpunit-coverage": "@test --coverage-html=./.build/phpunit/ --coverage-clover=./.build/phpunit/clover.xml", 184 | "test-type-coverage": "@pest-type-coverage", 185 | "text-fix": "npx textlint --fix ./*.md ./.github/*.md ./docs/**/*.md", 186 | "text-lint": "npx textlint --format=pretty-error ./*.md ./.github/*.md ./docs/**/*.md", 187 | "trufflehog": "trufflehog git https://github.com/guanguans/ai-commit --only-verified", 188 | "yaml-lint": "@php ./vendor/bin/yaml-lint .*.yml .github/ --ansi -v", 189 | "zh-fix": "@zh-lint --fix", 190 | "zh-lint": "zhlint 'README.md' --config=.zhlintrc" 191 | } 192 | } 193 | -------------------------------------------------------------------------------- /config/app.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view 9 | * the LICENSE file that was distributed with this source code. 10 | * 11 | * @see https://github.com/guanguans/favorite-link 12 | */ 13 | 14 | return [ 15 | /* 16 | |-------------------------------------------------------------------------- 17 | | Application Name 18 | |-------------------------------------------------------------------------- 19 | | 20 | | This value is the name of your application. This value is used when the 21 | | framework needs to place the application's name in a notification or 22 | | any other location as required by the application or its packages. 23 | | 24 | */ 25 | 26 | 'name' => 'Favorite-link', 27 | 28 | /* 29 | |-------------------------------------------------------------------------- 30 | | Application Version 31 | |-------------------------------------------------------------------------- 32 | | 33 | | This value determines the "version" your application is currently running 34 | | in. You may want to follow the "Semantic Versioning" - Given a version 35 | | number MAJOR.MINOR.PATCH when an update happens: https://semver.org. 36 | | 37 | */ 38 | 39 | 'version' => app('git.version'), 40 | 41 | /* 42 | |-------------------------------------------------------------------------- 43 | | Application Environment 44 | |-------------------------------------------------------------------------- 45 | | 46 | | This value determines the "environment" your application is currently 47 | | running in. This may determine how you prefer to configure various 48 | | services the application utilizes. This can be overridden using 49 | | the global command line "--env" option when calling commands. 50 | | 51 | */ 52 | 53 | 'env' => 'development', 54 | 55 | /* 56 | |-------------------------------------------------------------------------- 57 | | Application Timezone 58 | |-------------------------------------------------------------------------- 59 | | 60 | | Here you may specify the default timezone for your application, which 61 | | will be used by the PHP date and date-time functions. We have gone 62 | | ahead and set this to a sensible default for you out of the box. 63 | | 64 | */ 65 | 66 | 'timezone' => 'Asia/Shanghai', 67 | 68 | /* 69 | |-------------------------------------------------------------------------- 70 | | Autoloaded Service Providers 71 | |-------------------------------------------------------------------------- 72 | | 73 | | The service providers listed here will be automatically loaded on the 74 | | request to your application. Feel free to add your own services to 75 | | this array to grant expanded functionality to your applications. 76 | | 77 | */ 78 | 79 | 'providers' => [ 80 | // // Illuminate\Auth\AuthServiceProvider::class, 81 | // // Illuminate\Broadcasting\BroadcastServiceProvider::class, 82 | // // Illuminate\Bus\BusServiceProvider::class, 83 | // // Illuminate\Cache\CacheServiceProvider::class, 84 | // // Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class, 85 | // // Illuminate\Cookie\CookieServiceProvider::class, 86 | // // Illuminate\Database\DatabaseServiceProvider::class, 87 | // // Illuminate\Encryption\EncryptionServiceProvider::class, 88 | // // Illuminate\Filesystem\FilesystemServiceProvider::class, 89 | // // Illuminate\Foundation\Providers\FoundationServiceProvider::class, 90 | // // Illuminate\Hashing\HashServiceProvider::class, 91 | // // Illuminate\Mail\MailServiceProvider::class, 92 | // // Illuminate\Notifications\NotificationServiceProvider::class, 93 | // // Illuminate\Pagination\PaginationServiceProvider::class, 94 | // // Illuminate\Auth\Passwords\PasswordResetServiceProvider::class, 95 | // // Illuminate\Pipeline\PipelineServiceProvider::class, 96 | // // Illuminate\Queue\QueueServiceProvider::class, 97 | // // Illuminate\Redis\RedisServiceProvider::class, 98 | // // Illuminate\Session\SessionServiceProvider::class, 99 | // Illuminate\Translation\TranslationServiceProvider::class, 100 | // Illuminate\Validation\ValidationServiceProvider::class, 101 | // // Illuminate\View\ViewServiceProvider::class, 102 | // 103 | // App\Providers\AppServiceProvider::class, 104 | // GrahamCampbell\GitHub\GitHubServiceProvider::class, 105 | ], 106 | ]; 107 | -------------------------------------------------------------------------------- /config/commands.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view 9 | * the LICENSE file that was distributed with this source code. 10 | * 11 | * @see https://github.com/guanguans/favorite-link 12 | */ 13 | 14 | return [ 15 | /* 16 | |-------------------------------------------------------------------------- 17 | | Default Command 18 | |-------------------------------------------------------------------------- 19 | | 20 | | Laravel Zero will always run the command specified below when no command name is 21 | | provided. Consider update the default command for single command applications. 22 | | You cannot pass arguments to the default command because they are ignored. 23 | | 24 | */ 25 | 26 | 'default' => NunoMaduro\LaravelConsoleSummary\SummaryCommand::class, 27 | 28 | /* 29 | |-------------------------------------------------------------------------- 30 | | Commands Paths 31 | |-------------------------------------------------------------------------- 32 | | 33 | | This value determines the "paths" that should be loaded by the console's 34 | | kernel. Foreach "path" present on the array provided below the kernel 35 | | will extract all "Illuminate\Console\Command" based class commands. 36 | | 37 | */ 38 | 39 | 'paths' => [app_path('Commands')], 40 | 41 | /* 42 | |-------------------------------------------------------------------------- 43 | | Added Commands 44 | |-------------------------------------------------------------------------- 45 | | 46 | | You may want to include a single command class without having to load an 47 | | entire folder. Here you can specify which commands should be added to 48 | | your list of commands. The console's kernel will try to load them. 49 | | 50 | */ 51 | 52 | 'add' => [ 53 | // .. 54 | Illuminate\Foundation\Console\VendorPublishCommand::class, 55 | ], 56 | 57 | /* 58 | |-------------------------------------------------------------------------- 59 | | Hidden Commands 60 | |-------------------------------------------------------------------------- 61 | | 62 | | Your application commands will always be visible on the application list 63 | | of commands. But you can still make them "hidden" specifying an array 64 | | of commands below. All "hidden" commands can still be run/executed. 65 | | 66 | */ 67 | 68 | 'hidden' => [ 69 | NunoMaduro\LaravelConsoleSummary\SummaryCommand::class, 70 | Symfony\Component\Console\Command\DumpCompletionCommand::class, 71 | Symfony\Component\Console\Command\HelpCommand::class, 72 | Illuminate\Console\Scheduling\ScheduleRunCommand::class, 73 | Illuminate\Console\Scheduling\ScheduleListCommand::class, 74 | Illuminate\Console\Scheduling\ScheduleFinishCommand::class, 75 | // Illuminate\Foundation\Console\VendorPublishCommand::class, 76 | LaravelZero\Framework\Commands\StubPublishCommand::class, 77 | ], 78 | 79 | /* 80 | |-------------------------------------------------------------------------- 81 | | Removed Commands 82 | |-------------------------------------------------------------------------- 83 | | 84 | | Do you have a service provider that loads a list of commands that 85 | | you don't need? No problem. Laravel Zero allows you to specify 86 | | below a list of commands that you don't to see in your app. 87 | | 88 | */ 89 | 90 | 'remove' => [ 91 | // .. 92 | ], 93 | ]; 94 | -------------------------------------------------------------------------------- /config/github.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view 9 | * the LICENSE file that was distributed with this source code. 10 | * 11 | * @see https://github.com/guanguans/favorite-link 12 | */ 13 | 14 | return [ 15 | /* 16 | |-------------------------------------------------------------------------- 17 | | Default Connection Name 18 | |-------------------------------------------------------------------------- 19 | | 20 | | Here you may specify which of the connections below you wish to use as 21 | | your default connection for all work. Of course, you may use many 22 | | connections at once using the manager class. 23 | | 24 | */ 25 | 26 | 'default' => 'main', 27 | 28 | /* 29 | |-------------------------------------------------------------------------- 30 | | GitHub Connections 31 | |-------------------------------------------------------------------------- 32 | | 33 | | Here are each of the connections setup for your application. Example 34 | | configuration has been included, but you may add as many connections as 35 | | you would like. Note that the 5 supported authentication methods are: 36 | | "application", "jwt", "none", "private", and "token". 37 | | 38 | */ 39 | 40 | 'connections' => [ 41 | 'main' => [ 42 | 'method' => 'token', 43 | 'token' => 'your-token', 44 | // 'backoff' => false, 45 | // 'cache' => false, 46 | // 'version' => 'v3', 47 | // 'enterprise' => false, 48 | ], 49 | 50 | 'app' => [ 51 | 'method' => 'application', 52 | 'clientId' => 'your-client-id', 53 | 'clientSecret' => 'your-client-secret', 54 | // 'backoff' => false, 55 | // 'cache' => false, 56 | // 'version' => 'v3', 57 | // 'enterprise' => false, 58 | ], 59 | 60 | 'jwt' => [ 61 | 'method' => 'jwt', 62 | 'token' => 'your-jwt-token', 63 | // 'backoff' => false, 64 | // 'cache' => false, 65 | // 'version' => 'v3', 66 | // 'enterprise' => false, 67 | ], 68 | 69 | 'private' => [ 70 | 'method' => 'private', 71 | 'appId' => 'your-github-app-id', 72 | 'keyPath' => 'your-private-key-path', 73 | // 'key' => 'your-private-key-content', 74 | // 'passphrase' => 'your-private-key-passphrase' 75 | // 'backoff' => false, 76 | // 'cache' => false, 77 | // 'version' => 'v3', 78 | // 'enterprise' => false, 79 | ], 80 | 81 | 'none' => [ 82 | 'method' => 'none', 83 | // 'backoff' => false, 84 | // 'cache' => false, 85 | // 'version' => 'v3', 86 | // 'enterprise' => false, 87 | ], 88 | ], 89 | 90 | /* 91 | |-------------------------------------------------------------------------- 92 | | HTTP Cache 93 | |-------------------------------------------------------------------------- 94 | | 95 | | Here are each of the cache configurations setup for your application. 96 | | Only the "illuminate" driver is provided out of the box. Example 97 | | configuration has been included. 98 | | 99 | */ 100 | 101 | 'cache' => [ 102 | 'main' => [ 103 | 'driver' => 'illuminate', 104 | 'connector' => null, // null means use default driver 105 | // 'min' => 43200, 106 | // 'max' => 172800 107 | ], 108 | 109 | 'bar' => [ 110 | 'driver' => 'illuminate', 111 | 'connector' => 'redis', // config/cache.php 112 | // 'min' => 43200, 113 | // 'max' => 172800 114 | ], 115 | ], 116 | ]; 117 | -------------------------------------------------------------------------------- /config/laravel-console-summary.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view 9 | * the LICENSE file that was distributed with this source code. 10 | * 11 | * @see https://github.com/guanguans/favorite-link 12 | */ 13 | 14 | return [ 15 | /* 16 | |-------------------------------------------------------------------------- 17 | | Hide Commands 18 | |-------------------------------------------------------------------------- 19 | | 20 | | This option allows to hide certain commands from the summary output. 21 | | They will still be available in your application. Wildcards are supported 22 | | 23 | | Examples: "make:*", "list" 24 | | 25 | */ 26 | 27 | 'hide' => [ 28 | 'list', 29 | ], 30 | 31 | /* 32 | |-------------------------------------------------------------------------- 33 | | Custom Binary Name 34 | |-------------------------------------------------------------------------- 35 | | 36 | | This option allows to override the Artisan binary name that is used 37 | | in the command usage output. 38 | | 39 | */ 40 | 41 | 'binary' => null, 42 | ]; 43 | -------------------------------------------------------------------------------- /favorite-link: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | 8 | * 9 | * For the full copyright and license information, please view 10 | * the LICENSE file that was distributed with this source code. 11 | * 12 | * @see https://github.com/guanguans/favorite-link 13 | */ 14 | 15 | \define('LARAVEL_START', microtime(true)); 16 | 17 | /* 18 | |-------------------------------------------------------------------------- 19 | | Register The Auto Loader 20 | |-------------------------------------------------------------------------- 21 | | 22 | | Composer provides a convenient, automatically generated class loader 23 | | for our application. We just need to utilize it! We'll require it 24 | | into the script here so that we do not have to worry about the 25 | | loading of any our classes "manually". Feels great to relax. 26 | | 27 | */ 28 | 29 | $autoloader = require file_exists(__DIR__.'/vendor/autoload.php') ? __DIR__.'/vendor/autoload.php' : __DIR__.'/../../autoload.php'; 30 | 31 | /** @noinspection UsingInclusionOnceReturnValueInspection */ 32 | $app = require_once __DIR__.'/bootstrap/app.php'; 33 | 34 | /* 35 | |-------------------------------------------------------------------------- 36 | | Run The Artisan Application 37 | |-------------------------------------------------------------------------- 38 | | 39 | | When we run the console application, the current CLI command will be 40 | | executed in this console and the response sent back to a terminal 41 | | or another output device for the developers. Here goes nothing! 42 | | 43 | */ 44 | 45 | $kernel = $app->make(Illuminate\Contracts\Console\Kernel::class); 46 | 47 | $status = $kernel->handle( 48 | $input = new Symfony\Component\Console\Input\ArgvInput, 49 | new Symfony\Component\Console\Output\ConsoleOutput 50 | ); 51 | 52 | /* 53 | |-------------------------------------------------------------------------- 54 | | Shutdown The Application 55 | |-------------------------------------------------------------------------- 56 | | 57 | | Once Artisan has finished running, we will fire off the shutdown events 58 | | so that any final work may be done by the application before we shut 59 | | down the process. This is the last thing to happen to the request. 60 | | 61 | */ 62 | 63 | $kernel->terminate($input, $status); 64 | 65 | exit($status); 66 | -------------------------------------------------------------------------------- /phpunit.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | ./tests/Feature 12 | 13 | 14 | ./tests/Unit 15 | 16 | 17 | 18 | 19 | ./app 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /rector.php: -------------------------------------------------------------------------------- 1 | 10 | * 11 | * For the full copyright and license information, please view 12 | * the LICENSE file that was distributed with this source code. 13 | * 14 | * @see https://github.com/guanguans/favorite-link 15 | */ 16 | 17 | use Rector\CodeQuality\Rector\If_\ExplicitBoolCompareRector; 18 | use Rector\CodeQuality\Rector\LogicalAnd\LogicalToBooleanRector; 19 | use Rector\CodingStyle\Rector\ArrowFunction\StaticArrowFunctionRector; 20 | use Rector\CodingStyle\Rector\Closure\StaticClosureRector; 21 | use Rector\CodingStyle\Rector\Encapsed\EncapsedStringsToSprintfRector; 22 | use Rector\CodingStyle\Rector\Encapsed\WrapEncapsedVariableInCurlyBracesRector; 23 | use Rector\CodingStyle\Rector\FuncCall\ArraySpreadInsteadOfArrayMergeRector; 24 | use Rector\CodingStyle\Rector\Stmt\NewlineAfterStatementRector; 25 | use Rector\Config\RectorConfig; 26 | use Rector\DeadCode\Rector\ClassLike\RemoveAnnotationRector; 27 | use Rector\DeadCode\Rector\ClassMethod\RemoveEmptyClassMethodRector; 28 | use Rector\EarlyReturn\Rector\Return_\ReturnBinaryOrToEarlyReturnRector; 29 | use Rector\PHPUnit\Set\PHPUnitSetList; 30 | use Rector\Renaming\Rector\FuncCall\RenameFunctionRector; 31 | use Rector\ValueObject\PhpVersion; 32 | 33 | return RectorConfig::configure() 34 | ->withPaths([ 35 | __DIR__.'/app', 36 | __DIR__.'/bootstrap', 37 | __DIR__.'/tests', 38 | __DIR__.'/composer-updater', 39 | __DIR__.'/favorite-link', 40 | ...glob(__DIR__.'/{*,.*}.php', \GLOB_BRACE), 41 | ]) 42 | ->withRootFiles() 43 | // ->withSkipPath(__DIR__.'/tests.php') 44 | ->withSkip([ 45 | '**/__snapshots__/*', 46 | '**/Fixtures/*', 47 | __DIR__.'/tests.php', 48 | __FILE__, 49 | ]) 50 | ->withCache(__DIR__.'/.build/rector/') 51 | ->withParallel() 52 | // ->withoutParallel() 53 | // ->withImportNames(importNames: false) 54 | ->withImportNames(importDocBlockNames: false, importShortClasses: false) 55 | ->withFluentCallNewLine() 56 | ->withAttributesSets(phpunit: true) 57 | ->withComposerBased(phpunit: true) 58 | ->withPhpVersion(PhpVersion::PHP_84) 59 | // ->withDowngradeSets(php84: true) 60 | ->withPhpSets(php84: true) 61 | ->withSets([ 62 | PHPUnitSetList::PHPUNIT_110, 63 | ]) 64 | ->withPreparedSets( 65 | deadCode: true, 66 | codeQuality: true, 67 | codingStyle: true, 68 | typeDeclarations: true, 69 | privatization: true, 70 | naming: true, 71 | instanceOf: true, 72 | earlyReturn: true, 73 | phpunitCodeQuality: true, 74 | ) 75 | ->withRules([ 76 | ArraySpreadInsteadOfArrayMergeRector::class, 77 | StaticArrowFunctionRector::class, 78 | StaticClosureRector::class, 79 | ]) 80 | ->withConfiguredRule(RemoveAnnotationRector::class, [ 81 | 'phpstan-ignore', 82 | 'phpstan-ignore-next-line', 83 | 'psalm-suppress', 84 | ]) 85 | ->withConfiguredRule(RenameFunctionRector::class, [ 86 | 'Pest\Faker\fake' => 'fake', 87 | 'Pest\Faker\faker' => 'faker', 88 | // 'faker' => 'fake', 89 | 'test' => 'it', 90 | ] + array_reduce( 91 | [ 92 | // 'value', 93 | // 'base64_encode_file', 94 | // 'tap', 95 | ], 96 | static function (array $carry, string $func): array { 97 | /** @see https://github.com/laravel/framework/blob/11.x/src/Illuminate/Support/functions.php */ 98 | $carry[$func] = "App\\Support\\$func"; 99 | 100 | return $carry; 101 | }, 102 | [] 103 | )) 104 | ->withSkip([ 105 | EncapsedStringsToSprintfRector::class, 106 | ExplicitBoolCompareRector::class, 107 | LogicalToBooleanRector::class, 108 | NewlineAfterStatementRector::class, 109 | ReturnBinaryOrToEarlyReturnRector::class, 110 | WrapEncapsedVariableInCurlyBracesRector::class, 111 | ]) 112 | ->withSkip([ 113 | RemoveEmptyClassMethodRector::class => [ 114 | __DIR__.'/app/Providers/AppServiceProvider.php', 115 | ], 116 | StaticArrowFunctionRector::class => $staticArrowFunctionPaths = [ 117 | __DIR__.'/tests', 118 | ], 119 | StaticClosureRector::class => $staticArrowFunctionPaths, 120 | ]); 121 | -------------------------------------------------------------------------------- /tests/CreatesApplication.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view 9 | * the LICENSE file that was distributed with this source code. 10 | * 11 | * @see https://github.com/guanguans/favorite-link 12 | */ 13 | 14 | namespace Tests; 15 | 16 | use Illuminate\Contracts\Console\Kernel; 17 | use Illuminate\Foundation\Application; 18 | 19 | trait CreatesApplication 20 | { 21 | /** 22 | * Creates the application. 23 | */ 24 | #[\Override] 25 | public function createApplication(): Application 26 | { 27 | $app = require __DIR__.'/../bootstrap/app.php'; 28 | 29 | $app->make(Kernel::class)->bootstrap(); 30 | 31 | return $app; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /tests/Datasets/Movies.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view 9 | * the LICENSE file that was distributed with this source code. 10 | * 11 | * @see https://github.com/guanguans/favorite-link 12 | */ 13 | 14 | dataset('movies', [ 15 | '肖申克的救赎', 16 | '美丽人生', 17 | '阿甘正传', 18 | '这个杀手不太冷', 19 | '千与千寻', 20 | '海上钢琴师', 21 | '放牛班的春天', 22 | '三傻大闹宝莱坞', 23 | '少年派的奇幻漂流', 24 | '当幸福来敲门', 25 | ]); 26 | -------------------------------------------------------------------------------- /tests/Faker.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view 9 | * the LICENSE file that was distributed with this source code. 10 | * 11 | * @see https://github.com/guanguans/favorite-link 12 | */ 13 | 14 | namespace Tests; 15 | 16 | use Faker\Factory; 17 | use Faker\Generator; 18 | 19 | trait Faker 20 | { 21 | final protected static function faker(string $locale = Factory::DEFAULT_LOCALE): Generator 22 | { 23 | /** @var array $fakers */ 24 | static $fakers = []; 25 | 26 | if (!\array_key_exists($locale, $fakers)) { 27 | $faker = Factory::create($locale); 28 | 29 | $faker->seed(9001); 30 | 31 | $fakers[$locale] = $faker; 32 | } 33 | 34 | return $fakers[$locale]; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /tests/Feature/ArchTest.php: -------------------------------------------------------------------------------- 1 | 11 | * 12 | * For the full copyright and license information, please view 13 | * the LICENSE file that was distributed with this source code. 14 | * 15 | * @see https://github.com/guanguans/favorite-link 16 | */ 17 | 18 | use App\Commands\Command; 19 | use App\Commands\FeedCommand; 20 | 21 | arch()->preset()->php(); 22 | arch()->preset()->security(); 23 | // arch()->preset()->laravel(); 24 | arch()->preset()->strict()->ignoring([ 25 | Command::class, 26 | FeedCommand::class, 27 | ]); 28 | // arch()->preset()->relaxed(); 29 | 30 | arch('will not use debugging functions') 31 | ->group(__DIR__, __FILE__) 32 | // ->skip() 33 | ->expect([ 34 | 'echo', 35 | 'print', 36 | 'die', 37 | 'exit', 38 | 'printf', 39 | 'vprintf', 40 | 'var_dump', 41 | 'dump', 42 | 'dd', 43 | 'ray', 44 | 'print_r', 45 | 'var_export', 46 | ]) 47 | ->each->not->toBeUsed(); 48 | -------------------------------------------------------------------------------- /tests/Feature/FeedCommandTest.php: -------------------------------------------------------------------------------- 1 | 10 | * 11 | * For the full copyright and license information, please view 12 | * the LICENSE file that was distributed with this source code. 13 | * 14 | * @see https://github.com/guanguans/favorite-link 15 | */ 16 | 17 | use App\Commands\FeedCommand; 18 | use Laminas\Feed\Writer\Exception\InvalidArgumentException; 19 | 20 | it('will throw an InvalidArgumentException of Symfony', function (): void { 21 | $this->artisan(FeedCommand::class, ['--from' => $this->faker()->filePath()])->assertFailed(); 22 | })->group(__DIR__, __FILE__); 23 | 24 | it('will throw an InvalidArgumentException of Laminas', function (): void { 25 | $this->artisan(FeedCommand::class, ['--from' => fixtures_path('README.md')])->assertOk(); 26 | })->group(__DIR__, __FILE__)->throws(InvalidArgumentException::class); 27 | 28 | it('can generate feed', function (): void { 29 | $this->artisan(FeedCommand::class)->assertOk(); 30 | })->group(__DIR__, __FILE__); 31 | -------------------------------------------------------------------------------- /tests/Feature/InspireCommandTest.php: -------------------------------------------------------------------------------- 1 | 10 | * 11 | * For the full copyright and license information, please view 12 | * the LICENSE file that was distributed with this source code. 13 | * 14 | * @see https://github.com/guanguans/favorite-link 15 | */ 16 | 17 | use App\Commands\InspireCommand; 18 | 19 | it('can dump inspiration', function (): void { 20 | $this->artisan(InspireCommand::class)->assertOk(); 21 | })->group(__DIR__, __FILE__); 22 | -------------------------------------------------------------------------------- /tests/Fixtures/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guanguans/favorite-link/8bebfb48d125bdf8e66c5c588934aca2b927bd95/tests/Fixtures/README.md -------------------------------------------------------------------------------- /tests/Pest.php: -------------------------------------------------------------------------------- 1 | 11 | * 12 | * For the full copyright and license information, please view 13 | * the LICENSE file that was distributed with this source code. 14 | * 15 | * @see https://github.com/guanguans/favorite-link 16 | */ 17 | 18 | use Illuminate\Support\Facades\Process; 19 | use Pest\Expectation; 20 | use Symfony\Component\Finder\Finder; 21 | use Tests\TestCase; 22 | 23 | uses(TestCase::class) 24 | ->beforeAll(function (): void { 25 | clear_same_namespace(); 26 | }) 27 | ->beforeEach(function (): void { 28 | clear_same_namespace(); 29 | }) 30 | ->afterEach(function (): void {}) 31 | ->afterAll(function (): void { 32 | Process::run('git checkout -- README.atom README.rss'); 33 | }) 34 | ->in( 35 | __DIR__, 36 | // __DIR__.'/Feature', 37 | // __DIR__.'/Unit' 38 | ); 39 | /* 40 | |-------------------------------------------------------------------------- 41 | | Expectations 42 | |-------------------------------------------------------------------------- 43 | | 44 | | When you're writing tests, you often need to check that values meet certain conditions. The 45 | | "expect()" function gives you access to a set of "expectations" methods that you can use 46 | | to assert different things. Of course, you may extend the Expectation API at any time. 47 | | 48 | */ 49 | 50 | expect()->extend('toBetween', fn (int $min, int $max): Expectation => expect($this->value) 51 | ->toBeGreaterThanOrEqual($min) 52 | ->toBeLessThanOrEqual($max)); 53 | 54 | expect()->extend('assertCallback', function (Closure $assertions): Expectation { 55 | $assertions($this->value); 56 | 57 | return $this; 58 | }); 59 | 60 | /* 61 | |-------------------------------------------------------------------------- 62 | | Functions 63 | |-------------------------------------------------------------------------- 64 | | 65 | | While Pest is very powerful out-of-the-box, you may have some testing code specific to your 66 | | project that you don't want to repeat in every file. Here you can also expose helpers as 67 | | global functions to help you to reduce the number of lines of code in your test files. 68 | | 69 | */ 70 | 71 | /** 72 | * @throws ReflectionException 73 | */ 74 | function class_namespace(object|string $class): string 75 | { 76 | $class = \is_object($class) ? $class::class : $class; 77 | 78 | return new ReflectionClass($class)->getNamespaceName(); 79 | } 80 | 81 | function fixtures_path(string $path = ''): string 82 | { 83 | return __DIR__.'/Fixtures'.($path ? \DIRECTORY_SEPARATOR.$path : $path); 84 | } 85 | 86 | function clear_same_namespace(): void 87 | { 88 | foreach ( 89 | Finder::create() 90 | ->in(__DIR__.'/../vendor/guanguans/ai-commit/app') 91 | ->name('*.php') as $finder 92 | ) { 93 | file_put_contents($finder->getPathname(), ' 7 | * 8 | * For the full copyright and license information, please view 9 | * the LICENSE file that was distributed with this source code. 10 | * 11 | * @see https://github.com/guanguans/favorite-link 12 | */ 13 | 14 | namespace Tests; 15 | 16 | use LaravelZero\Framework\Testing\TestCase as BaseTestCase; 17 | use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration; 18 | use Symfony\Component\VarDumper\Test\VarDumperTestTrait; 19 | 20 | abstract class TestCase extends BaseTestCase 21 | { 22 | use CreatesApplication; 23 | use Faker; 24 | use MockeryPHPUnitIntegration; 25 | use VarDumperTestTrait; 26 | 27 | /** 28 | * This method is called before each test. 29 | */ 30 | #[\Override] 31 | protected function setUp(): void 32 | { 33 | parent::setUp(); 34 | // \DG\BypassFinals::enable(); 35 | $this->startMockery(); 36 | } 37 | 38 | /** 39 | * This method is called after each test. 40 | */ 41 | #[\Override] 42 | protected function tearDown(): void 43 | { 44 | $this->finish(); 45 | $this->closeMockery(); 46 | parent::tearDown(); 47 | } 48 | 49 | /** 50 | * Run extra tear down code. 51 | */ 52 | private function finish(): void 53 | { 54 | // call more tear down methods 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /tests/Unit/ExampleTest.php: -------------------------------------------------------------------------------- 1 | 10 | * 11 | * For the full copyright and license information, please view 12 | * the LICENSE file that was distributed with this source code. 13 | * 14 | * @see https://github.com/guanguans/favorite-link 15 | */ 16 | 17 | it('can get a movie', function (string $movie): void { 18 | expect($movie)->toBeString(); 19 | })->group(__DIR__, __FILE__)->with('movies')->skip(); 20 | --------------------------------------------------------------------------------