Today is the Symfony Hackday!
If you want to work on API Platform, here are some ideas of issues to tackle:
<?php | |
// Verbose | |
#[Get] // path defaults to /users | |
#[Get("/company/{companyId}/users")] | |
#[Post] // path defaults to /users | |
#[Post("/company/{companyId}/users)] | |
class Users extends \ArrayObject | |
{ |
Today is the Symfony Hackday!
If you want to work on API Platform, here are some ideas of issues to tackle:
<?php | |
require __DIR__.'/vendor/autoload.php'; | |
use Rize\UriTemplate; | |
$uri = new UriTemplate('', ['version' => 1.1]); | |
var_dump($uri->extract('https://example.net/{ip}', 'https://example.net/2001:db8::35')); | |
var_dump($uri->extract('https://example.net/{ip}', 'https://example.net/2001:db8::35', true)); |
require "addressable/template" | |
template = Addressable::Template.new( | |
"https://example.net/{ip}" | |
) | |
uri = Addressable::URI.parse( | |
"https://example.net/2001:db8::35" | |
) | |
puts template.extract(uri).inspect |
package com.example.demo; | |
import java.util.Map; | |
import org.springframework.boot.SpringApplication; | |
import org.springframework.boot.autoconfigure.SpringBootApplication; | |
import org.springframework.web.bind.annotation.GetMapping; | |
import org.springframework.web.bind.annotation.RestController; | |
import org.springframework.web.util.UriTemplate; |
using System; | |
using Tavis.UriTemplates; | |
public class Program | |
{ | |
public static void Main() | |
{ | |
var ut = new UriTemplate("https://example.net/{ip}"); | |
var p = ut.GetParameters(new Uri("https://example.net/2001:db8::35")); | |
Console.WriteLine(p["ip"]); |
### Kévin Dunglas Individual Contributor License Agreement | |
Thank you for your interest in contributing to open source software projects (“Projects”) made available by Kévin Dunglas or its affiliates. This Individual Contributor License Agreement (“Agreement”) sets out the terms governing any source code, object code, bug fixes, configuration changes, tools, specifications, documentation, data, materials, feedback, information or other works of authorship that you submit or have submitted, in any form and in any manner, to Kévin Dunglas in respect of any of the Projects (collectively “Contributions”). If you have any questions respecting this Agreement, please contact [email protected]. | |
You agree that the following terms apply to all of your past, present and future Contributions. Except for the licenses granted in this Agreement, you retain all of your right, title and interest in and to your Contributions. | |
**Copyright License.** You hereby grant, and agree to grant, to Kévin Dunglas a non-exclusive, |
#!/usr/bin/env php | |
<?php | |
require __DIR__.'/vendor/autoload.php'; | |
use Symfony\Component\HttpClient\CurlHttpClient; | |
use Symfony\Contracts\HttpClient\ResponseInterface; | |
use Psr\Log\AbstractLogger; | |
function printResponse(ResponseInterface $response): void |
<?php | |
$query = <<<'GRAPHQL' | |
query GetUser($user: String!) { | |
user (login: $user) { | |
name | |
repositoriesContributedTo { | |
totalCount | |
} |
<?php | |
$query = <<<'GRAPHQL' | |
query GetUser($user: String!) { | |
user (login: $user) { | |
name | |
repositoriesContributedTo { | |
totalCount | |
} |