microsoftgraph / msgraph-sdk-php

Microsoft Graph Library for PHP.
Other
578 stars 144 forks source link

Library is very large #1584

Closed Jamesking56 closed 1 month ago

Jamesking56 commented 1 month ago

Describe the bug

This Composer library is inordinately large compared to most libraries. Downloaded it is 244.8 MiB.

This causes issues for me since my hosting provider limits Composer to run maximum for 5 minutes. This library is so big that it causes Composer to timeout on my host.

I am only using the library since it is required for using PHP to send emails via Office 365, since SMTP is being phased out.

Is there a better trimmed version of this library that can be made available?

Expected behavior

The library size is closer to most Composer libraries, < 50 MiB.

For comparison, AWS SDK is 48.7 MiB.

How to reproduce

Require this library and look at the size output in vendor.

SDK Version

2.14.0

Latest version known to work for scenario above?

No response

Known Workarounds

No response

Debug output

image

Configuration

Specifically PHP timeout set to 300 seconds

Other information

Looks like the largest file in this repo is src/Generated/kioa-dom-export.txt at 35.7 MiB alone, do we need this file?

Ndiritu commented 1 month ago

Thank you for reporting this @Jamesking56 and for pointing out the large size of the kiota-dom-export file

We acknowledge this challenge and provide two workarounds at the moment:

kiota generate -l PHP -d https://raw.githubusercontent.com/microsoftgraph/msgraph-metadata/refs/heads/master/openapi/v1.0/openapi.yaml --include-path **/messages/** --include-path **/mailFolders/**  -c GraphMailClient -n Microsoft\Graph\Mail\Client -o ./client

For a guide on this, please refer to https://learn.microsoft.com/en-us/openapi/kiota/quickstarts/php.

microsoft-github-policy-service[bot] commented 1 month ago

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.