If you don’t see composer.json at the root of your project, it means that it’s stuck in the past, somewhere before 2012.
Every PHP project, whatever its size, MUST be based on Composer. Even if it’s a small project. Ironically, the most used software in PHP history is WordPress and doesn’t rely on Composer. WordPress is the only acceptable exception to the rule as it’s heavily relying on legacy code and backward compatibility. There are however plenty of projects to make WordPress work as a Composer dependency, to allow modern PHP development with WordPress.
Solution
Install Composer on your machine.
Then at the root of your project, enter these simple commands in your terminal.
composer init
composer dumpautoload
More
Read the series You’re not doing it right to step up your PHP game.