Skip to content
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

Solution for issue #199 #203

Closed
wants to merge 1 commit into from

Conversation

SamuelSchnelly
Copy link

Implementation of the solution for issue 199.

Solution: public function set_port_vlan ( $device_mac, $port_idx, $vlan_id ).

Including an example of the use of the function in examples/set_vlan_to_port.php.

@SamuelSchnelly
Copy link
Author

Fault:

You are using Composer 1 which is deprecated. You should upgrade to Composer 2, see https://blog.packagist.com/deprecating-composer-1-support/
Loading composer repositories with package information
Peer fingerprint did not match
https://repo.packagist.org could not be fully loaded, package information was loaded from the local cache and may be out of date
Updating dependencies (including require-dev)

                                                                                                                                                                                            
  [Composer\Downloader\TransportException]                                                                                                                                                  
  The "https://packagist.org/p/art-of-wifi/unifi-api-client%24b32e667a105dae143207af6d844aa440a30f3c052271765fb0da18950fc3248f.json" file could not be downloaded (HTTP/1.1 404 Not Found)  
                                                                                                                                                                                            

install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--no-suggest] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--ignore-platform-reqs] [--] [<packages>]...

@malle-pietje
Copy link
Collaborator

Thanks for the PR. This quite a lot of logic that may be better off in your own code; I need to think about this a bit.

Regarding the composer error; I don't see how that is related to this repo. We use composer 2.4.1 on our dev server and don't see such errors.

@SamuelSchnelly
Copy link
Author

The problem arose when testing the project after sending the request.

More details are available on https://scrutinizer-ci.com/g/Art-of-WiFi/UniFi-API-client/inspections/f8e4d433-11fb-4045-af0e-94593e79ef62

@malle-pietje
Copy link
Collaborator

Hmm, TBH I have no clue why this was triggered. Maybe it's a temporary glitch in the matrix...?

@malle-pietje
Copy link
Collaborator

Decided not to add this to the source code, instead we'll add an example to demonstrate this approach.

malle-pietje added a commit that referenced this pull request Dec 18, 2023
- hotfix to address cookie issues in UniFi OS 3.2.7, reported by @tflatebo
- fixed minor typos
- minor code reformatting of the examples
- starting with this release, cookies are no longer supported when connecting to a UniFi OS-based controller
- added set_vlan_to_port.php example, contributed by @SamuelSchnelly, #203
- allow additional parameters in `create_wlan()`'s payload, contributed by @sgrodzicki, #191
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.

2 participants