https://github.com/tarlepp/cannot-load-resource-issue
https://github.com/tarlepp/cannot-load-resource-issue
community-help symfony
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/tarlepp/cannot-load-resource-issue
- Owner: tarlepp
- Created: 2022-06-25T16:46:36.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2023-02-28T23:30:21.000Z (over 3 years ago)
- Last Synced: 2025-03-27T13:51:52.358Z (about 1 year ago)
- Topics: community-help, symfony
- Language: PHP
- Homepage:
- Size: 220 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# What is this?
Someone asked help on Symfony Slack channel with following error
```bash
Hey guys! Do anyone know how to fix this error?
Cannot load resource "../src/Controller/". Make sure there is a loader supporting the "attribute" type.
```
## What did I do?
I asked that person to share `composer.json` file contents.
https://symfony-devs.slack.com/archives/C3EQ7S3MJ/p1656174420895039?thread_ts=1656173105.327239&cid=C3EQ7S3MJ
And then I just created new project with that `composer.json` that I got.
After that I just run `composer install` command and made simple `IndexController.php`
that uses PHP attributes with route definitions and all worked as expected.
## How to test this?
1. Just clone the repository
2. Run `composer install` command
3. Run `symfony serve` command
4. Open `http://localhost:8000` url on your browser
5. Profit
## License
MIT