Questions tagged [autoloading]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer

Class "CRM_Core_DAO" not found

I have CiviCRM 5.56.1 installed via composer on a Drupal 9 application. In a custom module I use API v4 to manipulate records. For example, get membership types. \Civi\Api4\MembershipType::get()->...
3 votes
2 answers

Does class autoloading not work in standalone phpunit testing?

I'm following civix's upgrade instructions to enable unit tests to be executed with standalone phpunit. I've got my code in a work-in-progress git branch. The first commit captures the civix-...
1 vote
1 answer

class Civi not found

I'm trying to use the Civi class to debug an extension with build kit, but after I add this line: `Civi::log()->info('Hello, log!');` to my class I get: ampuser@58e3a823b9ee:/opt/buildkit/...
5 votes
2 answers

Class naming and namespaces: best practice as an extension author?

Noting these related questions (1 2 3) and these two wiki pages (1 2) and the psr-0 standard, I remain a bit lost about current best practice in CiviCRM extensions! So if I have an extenstion org....