Skip to content

[WIP] Resourceless ext/sysvshm #3235

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

Closed
wants to merge 6 commits into from

Conversation

brzuchal
Copy link
Contributor

@brzuchal brzuchal commented May 7, 2018

This patch removes System V Shared Memory resource list type and provides new class SharedMemoryBlock which replaces resource type.

function shm_attach(int $key, int $size, int $mode) : SharedMemoryBlock
function shm_detach(SharedMemoryBlock $object) : bool
function shm_remove(SharedMemoryBlock $object) : void
function shm_put_var(SharedMemoryBlock $object, int $variable_key, $variable) : bool
function shm_has_var(SharedMemoryBlock $object, int $variable_key) : bool
function shm_get_var(SharedMemoryBlock $object, int $variable_key) 
function shm_remove_var(SharedMemoryBlock $object, int $variable_key) 

class SharedMemoryBlock {
    public function __construct(int $key, int $size, int $perm) 
    public function has(int $variable_key) : bool
    public function get(int $variable_key) 
    public function set(int $variable_key, $variable) : void
    public function remove(int $variable_key) : void
    public function free() : void
}

There will be RFC created for this patch later. This patch targets PHP 8.

@brzuchal brzuchal changed the title Resourceless sysvshm [WIP] Resourceless sysvshm May 7, 2018
@brzuchal brzuchal changed the title [WIP] Resourceless sysvshm [WIP] Resourceless ext/sysvshm May 7, 2018
@krakjoe krakjoe added the RFC label May 10, 2018
@cmb69
Copy link
Member

cmb69 commented Jun 16, 2020

This might be closed in favor of PR #5499.

@kocsismate
Copy link
Member

I'm closing this since the migration has just been done by the linked PR.

@kocsismate kocsismate closed this Jun 16, 2020
@brzuchal
Copy link
Contributor Author

@kocsismate wait the linked PR only replaces reqource with a object without any OOP API, why is that? There's nothing special in object without behaviour?!

@kocsismate
Copy link
Member

@brzuchal For now, my goal was only to get rid of a resource type with the least number of controversial changes. Migrations that were previously done (ext/enchant, ext/gd etc.) also did the same.

This doesn't mean that you can't propose an OO interface for sysvshm (or any other extensions), even for 8.0 :) But as you wrote in the description, that will need an RFC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants