Home > Software design >  Installing Microsoft Graph SDK via Composer results in PHP-PSR4 issues
Installing Microsoft Graph SDK via Composer results in PHP-PSR4 issues

Time:09-14

Attempting to install the Microsoft Graph SDK is resulting in strange behaviour.

When running composer install microsoft/microsoft-graph I see this output:

Class Beta\Microsoft\Graph\IdentityGovernance\Model\Task located in ./vendor/microsoft/microsoft-graph/src/Beta/Microsoft/Graph/IdentityGovernanceNamespace/Model/Task.php does not comply with psr-4 autoloading standard. Skipping.
Class Beta\Microsoft\Graph\IdentityGovernance\Model\TaskReport located in ./vendor/microsoft/microsoft-graph/src/Beta/Microsoft/Graph/IdentityGovernanceNamespace/Model/TaskReport.php does not comply with psr-4 autoloading standard. Skipping.
Class Beta\Microsoft\Graph\IdentityGovernance\Model\LifecycleTaskCategory located in ./vendor/microsoft/microsoft-graph/src/Beta/Microsoft/Graph/IdentityGovernanceNamespace/Model/LifecycleTaskCategory.php does not comply with psr-4 autoloading standard. Skipping.
Class Beta\Microsoft\Graph\IdentityGovernance\Model\WorkflowTriggerTimeBasedAttribute located in ./vendor/microsoft/microsoft-graph/src/Beta/Microsoft/Graph/IdentityGovernanceNamespace/Model/WorkflowTriggerTimeBasedAttribute.php does not comply with psr-4 autoloading standard. Skipping.
Class Beta\Microsoft\Graph\IdentityGovernance\Model\TaskProcessingResult located in ./vendor/microsoft/microsoft-graph/src/Beta/Microsoft/Graph/IdentityGovernanceNamespace/Model/TaskProcessingResult.php does not comply with psr-4 autoloading standard. Skipping.
Class Beta\Microsoft\Graph\IdentityGovernance\Model\TimeBasedAttributeTrigger located in ./vendor/microsoft/microsoft-graph/src/Beta/Microsoft/Graph/IdentityGovernanceNamespace/Model/TimeBasedAttributeTrigger.php does not comply with psr-4 autoloading standard. Skipping.
Class Beta\Microsoft\Graph\IdentityGovernance\Model\WorkflowExecutionConditions located in ./vendor/microsoft/microsoft-graph/src/Beta/Microsoft/Graph/IdentityGovernanceNamespace/Model/WorkflowExecutionConditions.php does not comply with psr-4 autoloading standard. Skipping.
Class Beta\Microsoft\Graph\IdentityGovernance\Model\TriggerAndScopeBasedConditions located in ./vendor/microsoft/microsoft-graph/src/Beta/Microsoft/Graph/IdentityGovernanceNamespace/Model/TriggerAndScopeBasedConditions.php does not comply with psr-4 autoloading standard. Skipping.
Class Beta\Microsoft\Graph\IdentityGovernance\Model\WorkflowVersion located in ./vendor/microsoft/microsoft-graph/src/Beta/Microsoft/Graph/IdentityGovernanceNamespace/Model/WorkflowVersion.php does not comply with psr-4 autoloading standard. Skipping.
Class Beta\Microsoft\Graph\IdentityGovernance\Model\CustomTaskExtensionOperationStatus located in ./vendor/microsoft/microsoft-graph/src/Beta/Microsoft/Graph/IdentityGovernanceNamespace/Model/CustomTaskExtensionOperationStatus.php does not comply with psr-4 autoloading standard. Skipping.
Class Beta\Microsoft\Graph\IdentityGovernance\Model\LifecycleWorkflowsContainer located in ./vendor/microsoft/microsoft-graph/src/Beta/Microsoft/Graph/IdentityGovernanceNamespace/Model/LifecycleWorkflowsContainer.php does not comply with psr-4 autoloading standard. Skipping.
Class Beta\Microsoft\Graph\IdentityGovernance\Model\WorkflowTemplate located in ./vendor/microsoft/microsoft-graph/src/Beta/Microsoft/Graph/IdentityGovernanceNamespace/Model/WorkflowTemplate.php does not comply with psr-4 autoloading standard. Skipping.
Class Beta\Microsoft\Graph\IdentityGovernance\Model\CustomTaskExtensionCallbackConfiguration located in ./vendor/microsoft/microsoft-graph/src/Beta/Microsoft/Graph/IdentityGovernanceNamespace/Model/CustomTaskExtensionCallbackConfiguration.php does not comply with psr-4 autoloading standard. Skipping.
Class Beta\Microsoft\Graph\IdentityGovernance\Model\TaskDefinition located in ./vendor/microsoft/microsoft-graph/src/Beta/Microsoft/Graph/IdentityGovernanceNamespace/Model/TaskDefinition.php does not comply with psr-4 autoloading standard. Skipping.
Class Beta\Microsoft\Graph\IdentityGovernance\Model\Run located in ./vendor/microsoft/microsoft-graph/src/Beta/Microsoft/Graph/IdentityGovernanceNamespace/Model/Run.php does not comply with psr-4 autoloading standard. Skipping.
Class Beta\Microsoft\Graph\IdentityGovernance\Model\UserProcessingResult located in ./vendor/microsoft/microsoft-graph/src/Beta/Microsoft/Graph/IdentityGovernanceNamespace/Model/UserProcessingResult.php does not comply with psr-4 autoloading standard. Skipping.
Class Beta\Microsoft\Graph\IdentityGovernance\Model\WorkflowExecutionTrigger located in ./vendor/microsoft/microsoft-graph/src/Beta/Microsoft/Graph/IdentityGovernanceNamespace/Model/WorkflowExecutionTrigger.php does not comply with psr-4 autoloading standard. Skipping.
Class Beta\Microsoft\Graph\IdentityGovernance\Model\WorkflowBase located in ./vendor/microsoft/microsoft-graph/src/Beta/Microsoft/Graph/IdentityGovernanceNamespace/Model/WorkflowBase.php does not comply with psr-4 autoloading standard. Skipping.
Class Beta\Microsoft\Graph\IdentityGovernance\Model\LifecycleManagementSettings located in ./vendor/microsoft/microsoft-graph/src/Beta/Microsoft/Graph/IdentityGovernanceNamespace/Model/LifecycleManagementSettings.php does not comply with psr-4 autoloading standard. Skipping.
Class Beta\Microsoft\Graph\IdentityGovernance\Model\CustomTaskExtensionCalloutData located in ./vendor/microsoft/microsoft-graph/src/Beta/Microsoft/Graph/IdentityGovernanceNamespace/Model/CustomTaskExtensionCalloutData.php does not comply with psr-4 autoloading standard. Skipping.
Class Beta\Microsoft\Graph\IdentityGovernance\Model\CustomTaskExtensionCallbackData located in ./vendor/microsoft/microsoft-graph/src/Beta/Microsoft/Graph/IdentityGovernanceNamespace/Model/CustomTaskExtensionCallbackData.php does not comply with psr-4 autoloading standard. Skipping.
Class Beta\Microsoft\Graph\IdentityGovernance\Model\RuleBasedSubjectSet located in ./vendor/microsoft/microsoft-graph/src/Beta/Microsoft/Graph/IdentityGovernanceNamespace/Model/RuleBasedSubjectSet.php does not comply with psr-4 autoloading standard. Skipping.
Class Beta\Microsoft\Graph\IdentityGovernance\Model\WorkflowExecutionType located in ./vendor/microsoft/microsoft-graph/src/Beta/Microsoft/Graph/IdentityGovernanceNamespace/Model/WorkflowExecutionType.php does not comply with psr-4 autoloading standard. Skipping.
Class Beta\Microsoft\Graph\IdentityGovernance\Model\LifecycleWorkflowProcessingStatus located in ./vendor/microsoft/microsoft-graph/src/Beta/Microsoft/Graph/IdentityGovernanceNamespace/Model/LifecycleWorkflowProcessingStatus.php does not comply with psr-4 autoloading standard. Skipping.
Class Beta\Microsoft\Graph\IdentityGovernance\Model\UsersProcessingSummary located in ./vendor/microsoft/microsoft-graph/src/Beta/Microsoft/Graph/IdentityGovernanceNamespace/Model/UsersProcessingSummary.php does not comply with psr-4 autoloading standard. Skipping.
Class Beta\Microsoft\Graph\IdentityGovernance\Model\Workflow located in ./vendor/microsoft/microsoft-graph/src/Beta/Microsoft/Graph/IdentityGovernanceNamespace/Model/Workflow.php does not comply with psr-4 autoloading standard. Skipping.
Class Beta\Microsoft\Graph\IdentityGovernance\Model\LifecycleWorkflowCategory located in ./vendor/microsoft/microsoft-graph/src/Beta/Microsoft/Graph/IdentityGovernanceNamespace/Model/LifecycleWorkflowCategory.php does not comply with psr-4 autoloading standard. Skipping.
Class Beta\Microsoft\Graph\IdentityGovernance\Model\TaskReportSummary located in ./vendor/microsoft/microsoft-graph/src/Beta/Microsoft/Graph/IdentityGovernanceNamespace/Model/TaskReportSummary.php does not comply with psr-4 autoloading standard. Skipping.
Class Beta\Microsoft\Graph\IdentityGovernance\Model\UserSummary located in ./vendor/microsoft/microsoft-graph/src/Beta/Microsoft/Graph/IdentityGovernanceNamespace/Model/UserSummary.php does not comply with psr-4 autoloading standard. Skipping.
Class Beta\Microsoft\Graph\IdentityGovernance\Model\OnDemandExecutionOnly located in ./vendor/microsoft/microsoft-graph/src/Beta/Microsoft/Graph/IdentityGovernanceNamespace/Model/OnDemandExecutionOnly.php does not comply with psr-4 autoloading standard. Skipping.
Class Beta\Microsoft\Graph\IdentityGovernance\Model\CustomTaskExtension located in ./vendor/microsoft/microsoft-graph/src/Beta/Microsoft/Graph/IdentityGovernanceNamespace/Model/CustomTaskExtension.php does not comply with psr-4 autoloading standard. Skipping.
Class Beta\Microsoft\Graph\IdentityGovernance\Model\Parameter located in ./vendor/microsoft/microsoft-graph/src/Beta/Microsoft/Graph/IdentityGovernanceNamespace/Model/Parameter.php does not comply with psr-4 autoloading standard. Skipping.
Class Beta\Microsoft\Graph\IdentityGovernance\Model\RunSummary located in ./vendor/microsoft/microsoft-graph/src/Beta/Microsoft/Graph/IdentityGovernanceNamespace/Model/RunSummary.php does not comply with psr-4 autoloading standard. Skipping.
Class Beta\Microsoft\Graph\IdentityGovernance\Model\ValueType located in ./vendor/microsoft/microsoft-graph/src/Beta/Microsoft/Graph/IdentityGovernanceNamespace/Model/ValueType.php does not comply with psr-4 autoloading standard. Skipping.

Post installation, my composer.json contains "microsoft/microsoft-graph": "^1.74",

I cannot find any known issues around this? Any help appreciated.

CodePudding user response:

delete composer.lock and vendor and install again by running composer install

if still not working, then either there is some issues of dependancies or your composer version is causing issues with the package you trying to install.

what's your composer version?

you you can play around with composer version using the following following;

composer self-update // to update to latest version

composer self-update --rollback // roll back to previous version if you have one

composer self-update 1.1.1 // install specific version

after changing composer version, delete vendon and lock file and run composer install again

EDIT

its actually a known issue with the latest version of the package https://github.com/microsoftgraph/msgraph-sdk-php/issues/791

you should try older version maybe

  • Related