Skip to content

Updated folder methods#249

Open
jboomer007 wants to merge 3 commits into
Garethp:masterfrom
jboomer007:Updated-Folder-Methods
Open

Updated folder methods#249
jboomer007 wants to merge 3 commits into
Garethp:masterfrom
jboomer007:Updated-Folder-Methods

Conversation

@jboomer007

Copy link
Copy Markdown

No description provided.

Added Updated Folder Method
@marclaporte

Copy link
Copy Markdown

@jboomer007

I know it's been a while since your PR. I'd like to clean up list, improve things and get a new release.

Code has changed somewhat since your PR: https://github.com/Garethp/php-ews/commits/master/

Do you think it's still valid?

Thanks!

CC @kambereBr if you can opine)

@kambereBr

Copy link
Copy Markdown

@jboomer007 are you trying to replace the magic method by removing the @method UpdateFolder($request) annotation (line 78, ExchangeWebServices.php) and adding a concrete updateFolder() method instead?

If so, I’m concerned this would cause a major regression:

  • Current magic method : full UpdateFolder SOAP support (any folder properties)

  • Proposed change : hardcoded to only update DisplayName

That would break code relying on updates to other folder properties.

FYI: Magic method removal has already been started in PR #265, but the goal should be maintaining the same capabilities, not reducing functionality.

Thank you!

@jboomer007

jboomer007 commented Aug 27, 2025 via email

Copy link
Copy Markdown
Author

@Garethp

Garethp commented Aug 30, 2025

Copy link
Copy Markdown
Owner

While I think there might be scope to have a simpler method for updating folders, I think a method that updates a single property on a folder might be too narrow-scope to fit in with the simpler API usages that I've built. Taking a look at the other update* type methods that I've written, they tend to accept a wider range of changes rather than targeting specific items. I'm happy to be convinced otherwise, but that would be my take on it at the moment.

@marclaporte

Copy link
Copy Markdown

@jboomer007 @kambereBr any wisdom? :-)

@kambereBr

Copy link
Copy Markdown

@jboomer007 wanted to check back in on this since it's been a while. So based on what @Garethp said, I think we can still keep the rename working, just not hardcode it to only the name. Basically do it the same way updateItems() works, you pass the change in yourself instead of it being fixed to one field.

If you have time to update the PR that way, I'll be happy to see it move forward. If not just let me know and I'll open a new PR with this approach so it's not stuck forever. Either way works for me, just want to get this moving.

Thank you!

@jboomer007

Copy link
Copy Markdown
Author

Here is the update that allows for you to pass an array of properties. Its a rough but works

@jboomer007

Copy link
Copy Markdown
Author

@jboomer007 wanted to check back in on this since it's been a while. So based on what @Garethp said, I think we can still keep the rename working, just not hardcode it to only the name. Basically do it the same way updateItems() works, you pass the change in yourself instead of it being fixed to one field.

If you have time to update the PR that way, I'll be happy to see it move forward. If not just let me know and I'll open a new PR with this approach so it's not stuck forever. Either way works for me, just want to get this moving.

Thank you!

This has been updated. I gave a sample in the documentation for the function

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants