-
Notifications
You must be signed in to change notification settings - Fork 50
WSDL Regeneration #281
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
WSDL Regeneration #281
Conversation
|
@kambereBr This PR contains the types you needed, as well as all the other missed types. Would be able to test this and see if it solves your issues? |
…, speeding up `composer generate`
|
Just for the sake of it, I did try to sort the item generation in such a way that we'd always go top-down in the dependency tree so that by the time each class goes into generation then what they reference is already generated. This works fine when we only look at what the class extends, but once we look into what types they reference through their properties (Which we do need to do, for generating the getters and setters), we end up with circular dependencies. We could resolve that by doing a two-pass generation where we generate the classes first and then the getters/setters afterwards but it's almost definitely not worth the effort. It's not as though EWS is in active development and will be receiving more WSDL updates or anything, and running the |
@Garethp, thanks for this PR! I’m testing it now and will share feedback as soon as possible. Appreciate your support on this. |
Hi @Garethp, After testing this PR, the archiving issue still persists. I tested using the example code from: Unfortunately, it returns the following error: |
|
@kambereBr Can you post the full code that you're using to test? I know you said it's coming from the archiveItems example, but I'm assuming you're pulling the ItemIds in another way. Are you using impersonation somewhere? The error you posted doesn't look like it's related to a lack of types but rather an error from Exchange itself about the items you're trying to archive belonging to the wrong mailbox. |
@Garethp you’re right, the initial type issue is no longer occurring. Here’s a sample of the code I’m currently using: |
|
@Garethp Why is the https://github.com/Garethp/php-ews/blob/wsdl-regeneration/src/API/Enumeration/RoutingType.php |
Turns out that after the WSDL update was contributed last year I forgot to regenerate the API to match it. This PR solves that, adding all the new types with the newer WSDL.
For future note (although I doubt we'll need to worry about this again), we had an issue where on the first pass some types were trying to extend other types that hadn't been generated yet (but would be in that run). This was throwing some errors, so instead of trying to have the code either assume that those classes would eventually exist, or trying to order the generation in a way that prevented such dependencies we just opt to skip using those classes. As a result, we need to generate the items twice. The first pass creates all the items and the second pass adds the extends and references that were skipped in the first pass.